8000 Improve docs for SEND · python/cpython@4b0e60f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b0e60f

Browse files
committed
Improve docs for SEND
1 parent 0cb78f2 commit 4b0e60f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Doc/library/dis.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ iterations of the loop.
716716
* ``0``: :exc:`AssertionError`
717717
* ``1``: :exc:`StopIteration`
718718

719-
.. versionadded:: 3.11
719+
.. versionadded:: 3.12
720720

721721

722722
.. opcode:: LOAD_BUILD_CLASS
@@ -1346,10 +1346,13 @@ iterations of the loop.
13461346
.. versionadded:: 3.11
13471347

13481348

1349-
.. opcode:: SEND
1349+
.. opcode:: SEND (delta)
1350+
1351+
Equivalent to ``TOS = TOS1.send(TOS)``. Used in ``yield from`` and ``await``
1352+
statements.
13501353

1351-
Sends ``None`` to the sub-generator of this generator.
1352-
Used in ``yield from`` and ``await`` statements.
1354+
If the call raises :exc:`StopIteration`, pop both values, push its return
1355+
value, and increment the bytecode counter by *delta*.
13531356

13541357
.. versionadded:: 3.11
13551358

0 commit comments

Comments
 (0)
0