summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-07-30 15:49:26 (GMT)
committerGitHub <noreply@github.com>2023-07-30 15:49:26 (GMT)
commit0b3d6381757a6616fdf093a2ba99cc68c018b845 (patch)
tree0c44b74d86d54f464f430b12d12b1ab08e990a52
parente3b5ed7b1cb8ad12aa285cf78303c6dda0953181 (diff)
downloadcpython-0b3d6381757a6616fdf093a2ba99cc68c018b845.zip
cpython-0b3d6381757a6616fdf093a2ba99cc68c018b845.tar.gz
cpython-0b3d6381757a6616fdf093a2ba99cc68c018b845.tar.bz2
[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)
-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 97d5121..085fd2b 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)