Skip to content

Commit a24e25d

Browse files
authored
gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429)
1 parent 3979150 commit a24e25d

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
@@ -922,9 +922,10 @@ iterations of the loop.
922922
.. opcode:: UNPACK_SEQUENCE (count)
923923

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

927-
STACK.extend(STACK.pop()[:count:-1])
927+
assert(len(STACK[-1]) == count)
928+
STACK.extend(STACK.pop()[:-count-1:-1])
928929

929930

930931
.. opcode:: UNPACK_EX (counts)

0 commit comments

Comments
 (0)