mirror of
https://github.com/python/cpython.git
synced 2025-08-11 12:29:34 +00:00
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)
This commit is contained in:
parent
3979150a0d
commit
a24e25d74b
1 changed files with 3 additions and 2 deletions
|
@ -922,9 +922,10 @@ iterations of the loop.
|
||||||
.. opcode:: UNPACK_SEQUENCE (count)
|
.. opcode:: UNPACK_SEQUENCE (count)
|
||||||
|
|
||||||
Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the stack
|
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)
|
.. opcode:: UNPACK_EX (counts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue