diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-02-01 14:30:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 14:30:48 (GMT) |
commit | c796d34b2a121bcb89c6afd79160f95ece7cc945 (patch) | |
tree | b1bd20b39f744709003f6646f24cb9ac71737b22 /Doc | |
parent | 85cc5d0e5dd6cfa44d3e2782cca33d1f7f58231e (diff) | |
download | cpython-c796d34b2a121bcb89c6afd79160f95ece7cc945.zip cpython-c796d34b2a121bcb89c6afd79160f95ece7cc945.tar.gz cpython-c796d34b2a121bcb89c6afd79160f95ece7cc945.tar.bz2 |
[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 62251c3da06eb4662502295697f39730565b1717)
Diffstat (limited to 'Doc')
-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 1e323bd..a61dd75 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -563,10 +563,9 @@ the original TOS1. .. opcode:: END_ASYNC_FOR Terminates an :keyword:`async for` loop. Handles an exception raised - when awaiting a next item. If TOS 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 + TOS1 and the raised exception in TOS. Both are popped. + If the exception is not :exc:`StopAsyncIteration`, it is re-raised. .. versionadded:: 3.8 |