We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b3e02a commit 62251c3Copy full SHA for 62251c3
Doc/library/dis.rst
@@ -616,10 +616,9 @@ not have to be) the original ``STACK[-2]``.
616
.. opcode:: END_ASYNC_FOR
617
618
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.
+ 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.
623
624
.. versionadded:: 3.8
625
0 commit comments