diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-02-01 12:49:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 12:49:59 (GMT) |
commit | 62251c3da06eb4662502295697f39730565b1717 (patch) | |
tree | 87785742c6ae8c63a8fab7d1ca56579ce1170a2b | |
parent | 2b3e02a705907d0db2ce5266f06ad88a6b6160db (diff) | |
download | cpython-62251c3da06eb4662502295697f39730565b1717.zip cpython-62251c3da06eb4662502295697f39730565b1717.tar.gz cpython-62251c3da06eb4662502295697f39730565b1717.tar.bz2 |
gh-101454: fix documentation for END_ASYNC_FOR (#101455)
-rw-r--r-- | Doc/library/dis.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 6a68ec4..1fe2d5d 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -616,10 +616,9 @@ not have to be) the original ``STACK[-2]``. .. opcode:: END_ASYNC_FOR Terminates an :keyword:`async for` loop. Handles an exception raised - when awaiting a next item. If ``STACK[-1]`` is :exc:`StopAsyncIteration` pop 3 - values from the stack and restore the exception state using the second - of them. Otherwise re-raise the exception using the value - 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. .. versionadded:: 3.8 |