]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required...
authorBrett Cannon <brett@python.org>
Sat, 20 Nov 2021 00:40:34 +0000 (16:40 -0800)
committerGitHub <noreply@github.com>
Sat, 20 Nov 2021 00:40:34 +0000 (16:40 -0800)
commitbe36e0634060c7d5dee8e8876fb888bbb53d992a
treedcf28e3105e12b272cdca00de2b260dec6805183
parent4c616911b69ce07fb35da1721506bfaba0998c30
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170)

It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
Doc/c-api/iter.rst
Doc/c-api/typeobj.rst
Doc/glossary.rst
Doc/library/functions.rst
Doc/library/stdtypes.rst
Doc/reference/datamodel.rst
Misc/NEWS.d/next/Documentation/2021-10-22-12-09-18.bpo-45250.Iit5-Y.rst [new file with mode: 0644]