File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments