mirror of https://github.com/python/cpython.git
gh-101454: fix documentation for END_ASYNC_FOR (#101455)
(cherry picked from commit 62251c3da0
)
This commit is contained in:
parent
85cc5d0e5d
commit
c796d34b2a
|
@ -563,10 +563,9 @@ the original TOS1.
|
||||||
.. opcode:: END_ASYNC_FOR
|
.. opcode:: END_ASYNC_FOR
|
||||||
|
|
||||||
Terminates an :keyword:`async for` loop. Handles an exception raised
|
Terminates an :keyword:`async for` loop. Handles an exception raised
|
||||||
when awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 3
|
when awaiting a next item. The stack contains the async iterable in
|
||||||
values from the stack and restore the exception state using the second
|
TOS1 and the raised exception in TOS. Both are popped.
|
||||||
of them. Otherwise re-raise the exception using the value
|
If the exception is not :exc:`StopAsyncIteration`, it is re-raised.
|
||||||
from the stack. An exception handler block is removed from the block stack.
|
|
||||||
|
|
||||||
.. versionadded:: 3.8
|
.. versionadded:: 3.8
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue