This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nickgaya
Recipients docs@python, nickgaya
Date 2020-09-28.20:15:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601324135.53.0.963696566223.issue41879@roundup.psfhosted.org>
In-reply-to
Content
The documentation for the `async for` statement incorrectly states that "An asynchronous iterable is able to call asynchronous code in its iter implementation". Actually, this behavior was deprecated in Python 3.6 and removed in Python 3.7.  As of Python 3.7, the `__aiter__()` method must return an asynchronous iterator directly.

Suggested fix: Update the `async for` statement description for Python 3.7+ to match the "Asynchronous Iterators" section in the data model documentation.

> An :term:`asynchronous iterator` can call asynchronous code in its *next* method.

Relevant documentation:
- https://docs.python.org/3/reference/compound_stmts.html#the-async-for-statement
- https://docs.python.org/3/reference/datamodel.html#asynchronous-iterators
History
Date User Action Args
2020-09-28 20:15:35nickgayasetrecipients: + nickgaya, docs@python
2020-09-28 20:15:35nickgayasetmessageid: <1601324135.53.0.963696566223.issue41879@roundup.psfhosted.org>
2020-09-28 20:15:35nickgayalinkissue41879 messages
2020-09-28 20:15:35nickgayacreate