We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a68296 commit 725a9cdCopy full SHA for 725a9cd
Doc/library/dis.rst
@@ -1102,11 +1102,15 @@ iterations of the loop.
1102
.. opcode:: BUILD_TUPLE (count)
1103
1104
Creates a tuple consuming *count* items from the stack, and pushes the
1105
- resulting tuple onto the stack.::
+ resulting tuple onto the stack::
1106
1107
- assert count > 0
1108
- STACK, values = STACK[:-count], STACK[-count:]
1109
- STACK.append(tuple(values))
+ if count == 0:
+ value = ()
+ else:
1110
+ STACK = STACK[:-count]
1111
+ value = tuple(STACK[-count:])
1112
+
1113
+ STACK.append(value)
1114
1115
1116
.. opcode:: BUILD_LIST (count)
0 commit comments