mirror of
https://github.com/python/cpython.git
synced 2025-10-01 04:42:10 +00:00
[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 a0c06a4f93
)
Co-authored-by: Oleksandr Kravets <73752159+olekskrav@users.noreply.github.com>
This commit is contained in:
parent
47402e235d
commit
5b38bdeaf1
1 changed files with 1 additions and 1 deletions
|
@ -528,7 +528,7 @@ not have to be) the original ``STACK[-2]``.
|
||||||
|
|
||||||
key = STACK.pop()
|
key = STACK.pop()
|
||||||
container = STACK.pop()
|
container = STACK.pop()
|
||||||
STACK.append(container[index])
|
STACK.append(container[key])
|
||||||
|
|
||||||
|
|
||||||
.. opcode:: STORE_SUBSCR
|
.. opcode:: STORE_SUBSCR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue