Skip to content

Commit a0c06a4

Browse files
authored
Fix variable name in dis documentation example (GH-109343)
BINARY_SUBSCR example erroneously uses two different names `key` and `index` to refer to the same variable. STORE_SUBSCR and DELETE_SUBSCR use only `key` in the same context. Changing `index` to `key` for consistency.
1 parent 6c0ddca commit a0c06a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/dis.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ not have to be) the original ``STACK[-2]``.
597597

598598
key = STACK.pop()
599599
container = STACK.pop()
600-
STACK.append(container[index])
600+
STACK.append(container[key])
601601

602602

603603
.. opcode:: STORE_SUBSCR

0 commit comments

Comments
 (0)