Skip to content

Commit c796d34

Browse files
authored
[3.11] gh-101454: fix documentation for END_ASYNC_FOR (#101455) (#101493)
gh-101454: fix documentation for END_ASYNC_FOR (#101455) (cherry picked from commit 62251c3)
1 parent 85cc5d0 commit c796d34

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
@@ -563,10 +563,9 @@ the original TOS1.
563563
.. opcode:: END_ASYNC_FOR
564564

565565
Terminates an :keyword:`async for` loop. Handles an exception raised
566-
when awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 3
567-
values from the stack and restore the exception state using the second
568-
of them. Otherwise re-raise the exception using the value
569-
from the stack. An exception handler block is removed from the block stack.
566+
when awaiting a next item. The stack contains the async iterable in
567+
TOS1 and the raised exception in TOS. Both are popped.
568+
If the exception is not :exc:`StopAsyncIteration`, it is re-raised.
570569

571570
.. versionadded:: 3.8
572571

0 commit comments

Comments
 (0)