mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-101454: fix documentation for END_ASYNC_FOR (#101455)
This commit is contained in:
parent
2b3e02a705
commit
62251c3da0
1 changed files with 3 additions and 4 deletions
|
|
@ -616,10 +616,9 @@ not have to be) the original ``STACK[-2]``.
|
|||
.. opcode:: END_ASYNC_FOR
|
||||
|
||||
Terminates an :keyword:`async for` loop. Handles an exception raised
|
||||
when awaiting a next item. If ``STACK[-1]`` is :exc:`StopAsyncIteration` pop 3
|
||||
values from the stack and restore the exception state using the second
|
||||
of them. Otherwise re-raise the exception using the value
|
||||
from the stack. An exception handler block is removed from the block stack.
|
||||
when awaiting a next item. The stack contains the async iterable in
|
||||
``STACK[-2]`` and the raised exception in ``STACK[-1]``. Both are popped.
|
||||
If the exception is not :exc:`StopAsyncIteration`, it is re-raised.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue