summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2023-07-30 15:40:37 (GMT)
committerGitHub <noreply@github.com>2023-07-30 15:40:37 (GMT)
commita24e25d74bb5d30775a61853d34e0bb5a7e12c64 (patch)
treec9c7401578232c2aa14cf41a4e9a3ebb748f0e30
parent3979150a0d406707f6d253d7c15fb32c1e005a77 (diff)
downloadcpython-a24e25d74bb5d30775a61853d34e0bb5a7e12c64.zip
cpython-a24e25d74bb5d30775a61853d34e0bb5a7e12c64.tar.gz
cpython-a24e25d74bb5d30775a61853d34e0bb5a7e12c64.tar.bz2
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)
-rw-r--r--Doc/library/dis.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index accc652..2217c3a 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)