]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)
authorDong-hee Na <donghee.na@python.org>
Sun, 30 Jul 2023 15:40:37 +0000 (00:40 +0900)
committerGitHub <noreply@github.com>
Sun, 30 Jul 2023 15:40:37 +0000 (00:40 +0900)
Doc/library/dis.rst

index accc652a90649d93c5cb4a96e851dd31f298b1be..2217c3a80354592ae30e522b2fdf93cd4e29c243 100644 (file)
@@ -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)