diff options
author | Nick Gaya <nicholasgaya+github@gmail.com> | 2020-12-11 08:27:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 08:27:35 (GMT) |
commit | 4b8cdfcb22fbeaab9d954cb693a7fb3362a382b6 (patch) | |
tree | f79fda672ed015891fdc244afbbdfe3d343491b0 /Doc/reference | |
parent | 67b769f5157c9dad1c7dd6b24e067b9fdab5b35d (diff) | |
download | cpython-4b8cdfcb22fbeaab9d954cb693a7fb3362a382b6.zip cpython-4b8cdfcb22fbeaab9d954cb693a7fb3362a382b6.tar.gz cpython-4b8cdfcb22fbeaab9d954cb693a7fb3362a382b6.tar.bz2 |
bpo-41879: Doc: Fix description of async for statement (GH-23548)
Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables. This fix is relevant for version 3.7 onward.
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 62986cb..a55aacc 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -796,12 +796,12 @@ The :keyword:`!async for` statement .. productionlist:: python-grammar async_for_stmt: "async" `for_stmt` -An :term:`asynchronous iterable` is able to call asynchronous code in its -*iter* implementation, and :term:`asynchronous iterator` can call asynchronous -code in its *next* method. +An :term:`asynchronous iterable` provides an ``__aiter__`` method that directly +returns an :term:`asynchronous iterator`, which can call asynchronous code in +its ``__anext__`` method. The ``async for`` statement allows convenient iteration over asynchronous -iterators. +iterables. The following code:: |