Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a24e25d

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

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎Doc/library/dis.rst

Copy file name to clipboardExpand all lines: Doc/library/dis.rst
+3-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.