Skip to content

Commit 62251c3

Browse files
authored
gh-101454: fix documentation for END_ASYNC_FOR (#101455)
1 parent 2b3e02a commit 62251c3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/dis.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,9 @@ not have to be) the original ``STACK[-2]``.
616616
.. opcode:: END_ASYNC_FOR
617617

618618
Terminates an :keyword:`async for` loop. Handles an exception raised
619-
when awaiting a next item. If ``STACK[-1]`` is :exc:`StopAsyncIteration` pop 3
620-
values from the stack and restore the exception state using the second
621-
of them. Otherwise re-raise the exception using the value
622-
from the stack. An exception handler block is removed from the block stack.
619+
when awaiting a next item. The stack contains the async iterable in
620+
``STACK[-2]`` and the raised exception in ``STACK[-1]``. Both are popped.
621+
If the exception is not :exc:`StopAsyncIteration`, it is re-raised.
623622

624623
.. versionadded:: 3.8
625624

0 commit comments

Comments
 (0)