summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-03-04 12:41:17 (GMT)
committerGitHub <noreply@github.com>2022-03-04 12:41:17 (GMT)
commit586b24d3be1aec5d2568b070a249b4d75e608782 (patch)
treee5e92e960433634f839118b51039a3fec3429d3e /Doc
parent03c2a36b2bd2d4469160d1607619ee144175d753 (diff)
downloadcpython-586b24d3be1aec5d2568b070a249b4d75e608782.zip
cpython-586b24d3be1aec5d2568b070a249b4d75e608782.tar.gz
cpython-586b24d3be1aec5d2568b070a249b4d75e608782.tar.bz2
bpo-46841: Fix error message hacks in `GET_AWAITABLE` (GH-31664)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dis.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 3dac391..65e888d 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -475,15 +475,24 @@ the original TOS1.
**Coroutine opcodes**
-.. opcode:: GET_AWAITABLE
+.. opcode:: GET_AWAITABLE (where)
Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)``
returns ``o`` if ``o`` is a coroutine object or a generator object with
the CO_ITERABLE_COROUTINE flag, or resolves
``o.__await__``.
+ If the ``where`` operand is nonzero, it indicates where the instruction
+ occurs:
+
+ * ``1`` After a call to ``__aenter__``
+ * ``2`` After a call to ``__aexit__``
+
.. versionadded:: 3.5
+ .. versionchanged:: 3.11
+ Previously, this instruction did not have an oparg.
+
.. opcode:: GET_AITER