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

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


https://github.com/python/cpython/commit/a24e25d74bb5d30775a61853d34e0bb5a7e12c64
commit: a24e25d74bb5d30775a61853d34e0bb5a7e12c64
branch: main
author: Dong-hee Na <donghee.na at python.org>
committer: corona10 <donghee.na92 at gmail.com>
date: 2023-07-31T00:40:37+09:00
summary:

gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)

files:
M Doc/library/dis.rst

diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index accc652a90649..2217c3a803545 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)



More information about the Python-checkins mailing list