8000 [3.12] Fix variable name in dis documentation example (GH-109343) (#1… · python/cpython@5b38bde · GitHub
[go: up one dir, main page]

Skip to content

Commit 5b38bde

Browse files
[3.12] Fix variable name in dis documentation example (GH-109343) (#109364)
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. (cherry picked from commit a0c06a4) Co-authored-by: Oleksandr Kravets <73752159+olekskrav@users.noreply.github.com>
1 parent 47402e2 commit 5b38bde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/dis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ not have to be) the original ``STACK[-2]``.
528528

529529
key = STACK.pop()
530530
container = STACK.pop()
531-
STACK.append(container[index])
531+
STACK.append(container[key])
532532

533533

534534
.. opcode:: STORE_SUBSCR

0 commit comments

Comments
 (0)
0