summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2024-02-15 07:14:03 (GMT)
committerGitHub <noreply@github.com>2024-02-15 07:14:03 (GMT)
commit474204765bdbdd4bc84a8ba49d3a6558e9e4e3fd (patch)
tree57c75ebb1266d89b4c36a2f6bffad3e1c5f06888
parent4ebf8fbdab1c64041ff0ea54b3d15624f6e01511 (diff)
downloadcpython-474204765bdbdd4bc84a8ba49d3a6558e9e4e3fd.zip
cpython-474204765bdbdd4bc84a8ba49d3a6558e9e4e3fd.tar.gz
cpython-474204765bdbdd4bc84a8ba49d3a6558e9e4e3fd.tar.bz2
docs: use consistent .append() in dis.rst (#115434)
The STACK variable is described as like a Python list, so pushing to it should be done with .append() consistently throughout.
-rw-r--r--Doc/library/dis.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index e654760..190e994 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -1606,7 +1606,7 @@ iterations of the loop.
value = STACK.pop()
result = func(value)
- STACK.push(result)
+ STACK.append(result)
* ``oparg == 1``: call :func:`str` on *value*
* ``oparg == 2``: call :func:`repr` on *value*
@@ -1623,7 +1623,7 @@ iterations of the loop.
value = STACK.pop()
result = value.__format__("")
- STACK.push(result)
+ STACK.append(result)
Used for implementing formatted literal strings (f-strings).
@@ -1636,7 +1636,7 @@ iterations of the loop.
spec = STACK.pop()
value = STACK.pop()
result = value.__format__(spec)
- STACK.push(result)
+ STACK.append(result)
Used for implementing formatted literal strings (f-strings).
@@ -1783,7 +1783,7 @@ iterations of the loop.
arg2 = STACK.pop()
arg1 = STACK.pop()
result = intrinsic2(arg1, arg2)
- STACK.push(result)
+ STACK.append(result)
The operand determines which intrinsic function is called: