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.
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 @@
.. 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