summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-01-24 11:08:53 (GMT)
committerGitHub <noreply@github.com>2022-01-24 11:08:53 (GMT)
commit0367a36fdc36b9c909c4d5acf7cde6ceeec0ba69 (patch)
tree1a87e9cb04dca5ef87abc4bd55540bdb41bd2172 /Doc/library/dis.rst
parentd75a51bea3c2442f81d38ff850b81b8b7f3330f0 (diff)
downloadcpython-0367a36fdc36b9c909c4d5acf7cde6ceeec0ba69.zip
cpython-0367a36fdc36b9c909c4d5acf7cde6ceeec0ba69.tar.gz
cpython-0367a36fdc36b9c909c4d5acf7cde6ceeec0ba69.tar.bz2
bpo-43683: Streamline YIELD_VALUE and SEND (GH-30723)
* Split YIELD_VALUE into ASYNC_GEN_WRAP; YIELD_VALUE for async generators. * Split SEND into SEND; YIELD_VALUE. * Document new opcodes.
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r--Doc/library/dis.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index c9a4768..ddba668 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -1233,6 +1233,22 @@ All of the following opcodes use their arguments.
.. versionadded:: 3.11
+.. opcode:: SEND
+
+ Sends ``None`` to the sub-generator of this generator.
+ Used in ``yield from`` and ``await`` statements.
+
+ .. versionadded:: 3.11
+
+
+.. opcode:: ASYNC_GEN_WRAP
+
+ Wraps the value on top of the stack in an ``async_generator_wrapped_value``.
+ Used to yield in async generators.
+
+ .. versionadded:: 3.11
+
+
.. opcode:: HAVE_ARGUMENT
This is not really an opcode. It identifies the dividing line between