diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/dis.rst | 3 | ||||
-rw-r--r-- | Doc/whatsnew/3.13.rst | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 1a5ca16..e44fa46 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -824,7 +824,8 @@ iterations of the loop. oparg set to be the exception block depth, for efficient closing of generators. .. versionchanged:: 3.13 - this opcode no longer has an oparg + oparg is ``1`` if this instruction is part of a yield-from or await, and ``0`` + otherwise. .. opcode:: SETUP_ANNOTATIONS diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 5ada880..aa693c6 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -948,7 +948,8 @@ Others CPython bytecode changes ======================== -* ``YIELD_VALUE`` no longer has an oparg. The oparg of ``RESUME`` was +* The oparg of ``YIELD_VALUE`` is now ``1`` if the yield is part of a + yield-from or await, and ``0`` otherwise. The oparg of ``RESUME`` was changed to add a bit indicating whether the except-depth is 1, which is needed to optimize closing of generators. (Contributed by Irit Katriel in :gh:`111354`.) |