]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 30 Jul 2023 15:49:26 +0000 (08:49 -0700)
committerGitHub <noreply@github.com>
Sun, 30 Jul 2023 15:49:26 +0000 (15:49 +0000)
Doc/library/dis.rst

index 97d5121c4e8a5e7fe0a6c0559e49333d39130a4d..085fd2baba55c06cdb50ab9127a7b2e024ff5a23 100644 (file)
@@ -864,9 +864,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)