Visitar URL original
bpo-46841: Don't jump during `throw()` by brandtbucher · Pull Request #31968 · python/cpython · GitHub
Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the docs for SEND
  • Loading branch information
brandtbucher committed Mar 17, 2022
commit dcf97b2e2a875e91c0a77fecb2a579cee1066586
15 changes: 11 additions & 4 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,17 @@ iterations of the loop.
.. versionadded:: 3.11


.. opcode:: SEND

Sends ``None`` to the sub-generator of this generator.
Used in ``yield from`` and ``await`` statements.
.. opcode:: SEND (delta)

Equivalent to ``TOS = TOS1.send(TOS)``. Used in ``yield from`` and ``await``
statements.

If the call raises :exc:`StopIteration`, pop both values, push its return
value, and increment the bytecode counter by *delta*.

If TOS1 is ``NULL`` (set when it raises :exc:`StopIteration` during a
``throw()`` through the current frame), pop both values, push TOS (its
return value), and increment the bytecode counter by *delta*.

.. versionadded:: 3.11

Expand Down