summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-04-06 10:48:59 (GMT)
committerGitHub <noreply@github.com>2021-04-06 10:48:59 (GMT)
commitb37181e69209746adc2119c471599a1ea5faa6c8 (patch)
tree3605b5e9447fe18ed0c87b745daef1216301583f /Doc/library/dis.rst
parent489c36920e94bfb4988b6f965bd0aafdfaff0d4f (diff)
downloadcpython-b37181e69209746adc2119c471599a1ea5faa6c8.zip
cpython-b37181e69209746adc2119c471599a1ea5faa6c8.tar.gz
cpython-b37181e69209746adc2119c471599a1ea5faa6c8.tar.bz2
bpo-43683: Handle generator entry in bytecode (GH-25138)
* Handle check for sending None to starting generator and coroutine into bytecode. * Document new bytecode and make it fail gracefully if mis-compiled.
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r--Doc/library/dis.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index c21a667..875ab8b 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -1247,6 +1247,14 @@ All of the following opcodes use their arguments.
.. versionadded:: 3.10
+.. opcode:: GEN_START (kind)
+
+ Pops TOS. If TOS was not ``None``, raises an exception. The ``kind``
+ operand corresponds to the type of generator or coroutine and determines
+ the error message. The legal kinds are 0 for generator, 1 for coroutine,
+ and 2 for async generator.
+
+ .. versionadded:: 3.10
.. opcode:: HAVE_ARGUMENT