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 5207adf commit 1422500Copy full SHA for 1422500
Doc/library/dis.rst
@@ -1081,11 +1081,15 @@ iterations of the loop.
1081
.. opcode:: BUILD_TUPLE (count)
1082
1083
Creates a tuple consuming *count* items from the stack, and pushes the
1084
- resulting tuple onto the stack.::
+ resulting tuple onto the stack::
1085
1086
- assert count > 0
1087
- STACK, values = STACK[:-count], STACK[-count:]
1088
- STACK.append(tuple(values))
+ if count == 0:
+ value = ()
+ else:
1089
+ STACK = STACK[:-count]
1090
+ value = tuple(STACK[-count:])
1091
+
1092
+ STACK.append(value)
1093
1094
1095
.. opcode:: BUILD_LIST (count)
0 commit comments