[Python-checkins] [3.9] bpo-41879: Doc: Fix description of async for statement (GH-23548) (GH-23749)

miss-islington webhook-mailer at python.org
Sat Dec 12 23:24:56 EST 2020


https://github.com/python/cpython/commit/be9e4402db64564f7bf0fedb3769cead46c0d4c4
commit: be9e4402db64564f7bf0fedb3769cead46c0d4c4
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2020-12-12T20:24:31-08:00
summary:

[3.9] bpo-41879: Doc: Fix description of async for statement (GH-23548) (GH-23749)



Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables.  This fix is relevant for version 3.7 onward.
(cherry picked from commit 4b8cdfcb22fbeaab9d954cb693a7fb3362a382b6)


Co-authored-by: Nick Gaya <nicholasgaya+github at gmail.com>

files:
M Doc/reference/compound_stmts.rst

diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index b4e06e5b10d5a..2cae2f86d34f7 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -799,12 +799,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::
 



More information about the Python-checkins mailing list