summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorOleksandr Kravets <73752159+olekskrav@users.noreply.github.com>2023-09-13 05:07:56 (GMT)
committerGitHub <noreply@github.com>2023-09-13 05:07:56 (GMT)
commita0c06a4f933faccd7f8201701b2491d38464212c (patch)
tree9ae14bce4791cf397abe2841f4311bf35aef2c4c /Doc
parent6c0ddca409c1ed27b11c70386cd6c88be5d00115 (diff)
downloadcpython-a0c06a4f933faccd7f8201701b2491d38464212c.zip
cpython-a0c06a4f933faccd7f8201701b2491d38464212c.tar.gz
cpython-a0c06a4f933faccd7f8201701b2491d38464212c.tar.bz2
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.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dis.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 72e55cd..d087c7c 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -597,7 +597,7 @@ not have to be) the original ``STACK[-2]``.
key = STACK.pop()
container = STACK.pop()
- STACK.append(container[index])
+ STACK.append(container[key])
.. opcode:: STORE_SUBSCR