Skip to content

Commit 21d2735

Browse files
committed
pythongh-101454: fix documentation for END_ASYNC_FOR (python#101455)
(cherry picked from commit 62251c3)
1 parent 85cc5d0 commit 21d2735

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/dis.rst

Lines changed: 3 additions & 4 deletions
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)