gh-141984: Move generator iterator reference out of syntax docs - #154884
gh-141984: Move generator iterator reference out of syntax docs#154884encukou wants to merge 10 commits into
Conversation
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Documentation build overview
98 files changed ·
|
| methods. | ||
| More information about generators can be found in :ref:`the documentation for | ||
| the yield expression <yieldexpr>`. | ||
| Python's :term:`generators <generator>` -- or more precisely, |
There was a problem hiding this comment.
Yes, but before that's solved, this is the place to put the info.
| For example:: | ||
|
|
||
| >>> class CardDeck: | ||
| ... def __iter__(self): |
There was a problem hiding this comment.
Inconsistent indentation.
| Asynchronous generator-iterators | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| This subsection describes the methods of an asynchronous generator iterator, |
There was a problem hiding this comment.
An expanded introduction would be nice here, too. Although that can be done in a follow up.
| using/windows.html: virtual-environments | ||
| using/windows.html: windows-full | ||
|
|
||
| # Moved to library/stdtypes: |
There was a problem hiding this comment.
Yes, I think of removed-ids.txt as a TODO list.
There was a problem hiding this comment.
Yes, I think of removed-ids.txt as a TODO list.
I see. I'm worried we're effectively postponing this ad Kalendas Graecas. The list is quite long now, and people are already using these links. Doing it later makes less sense, as it will be more daunting to tackle at once (rather than incrementally), and by then most will have updated to the new location and the pain will have passed.
There was a problem hiding this comment.
(What does "ad Kalendas Graecas" mean?)
There was a problem hiding this comment.
(Ad Calendas Graecas (to the Greek Kalends) is a little old joke that means “never,” because the Kalends were the first day of each month in the Roman calendar, while the Greek calendar had no Kalends.)
Co-authored-by: Stan Ulbrych <stan@python.org>
| using/windows.html: virtual-environments | ||
| using/windows.html: windows-full | ||
|
|
||
| # Moved to library/stdtypes: |
There was a problem hiding this comment.
(What does "ad Kalendas Graecas" mean?)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
The Expressions section of the docs contains reference documentation (that is, descriptions of all the methods) for Generator-iterators and Asynchronous generator-iterators.
These look out of place here, and interfere with explaining the syntax around
yield.There are two places that would make a better home for these: stdtypes in Library and datamodel in Reference. (These two have a lot of overlap, for what I think are mostly historical reasons, but fixing that is out of scope for this PR.)
I think stdtypes is the better place to put these.
I added an introduction to Generators here, which currently overlaps a bit with the Yield expressions in the grammar docs. I'll be reworking Yield expressions next.