From: Dong-hee Na Date: Sun, 30 Jul 2023 15:40:37 +0000 (+0900) Subject: gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) X-Git-Tag: v3.13.0a1~1134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a24e25d74bb5d30775a61853d34e0bb5a7e12c64;p=thirdparty%2FPython%2Fcpython.git gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) --- diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index accc652a9064..2217c3a80354 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -922,9 +922,10 @@ iterations of the loop. .. opcode:: UNPACK_SEQUENCE (count) Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the stack - right-to-left:: + right-to-left. Require there to be exactly *count* values.:: - STACK.extend(STACK.pop()[:count:-1]) + assert(len(STACK[-1]) == count) + STACK.extend(STACK.pop()[:-count-1:-1]) .. opcode:: UNPACK_EX (counts)