[Python-checkins] [3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)

corona10 webhook-mailer at python.org
Sun Jul 30 11:49:30 EDT 2023


https://github.com/python/cpython/commit/0b3d6381757a6616fdf093a2ba99cc68c018b845
commit: 0b3d6381757a6616fdf093a2ba99cc68c018b845
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: corona10 <donghee.na92 at gmail.com>
date: 2023-07-30T15:49:26Z
summary:

[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)

files:
M Doc/library/dis.rst

diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 97d5121c4e8a5..085fd2baba55c 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -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)



More information about the Python-checkins mailing list