Skip to content

Commit 0b3d638

Browse files
[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)
1 parent e3b5ed7 commit 0b3d638

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/dis.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,9 +864,10 @@ iterations of the loop.
864864
.. opcode:: UNPACK_SEQUENCE (count)
865865

866866
Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the stack
867-
right-to-left::
867+
right-to-left. Require there to be exactly *count* values.::
868868

869-
STACK.extend(STACK.pop()[:count:-1])
869+
assert(len(STACK[-1]) == count)
870+
STACK.extend(STACK.pop()[:-count-1:-1])
870871

871872

872873
.. opcode:: UNPACK_EX (counts)

0 commit comments

Comments
 (0)