commit | 99aad31b7ad493d4feea04064bcd6b04061477f9 | [log] [tgz] |
---|---|---|
author | Brett Cannon <brett@python.org> | Mon Nov 22 15:09:15 2021 -0800 |
committer | GitHub <noreply@github.com> | Mon Nov 22 15:09:15 2021 -0800 |
tree | eaa5d4201bc97749a1fd44c568bd03f6452c5d22 | |
parent | 56b5cd52ab58d8f2f11f253ec1bb3e6000d2dbd2 [diff] |
[3.10] bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170) (GH-29650) 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__`. (cherry picked from commit be36e0634060c7d5dee8e8876fb888bbb53d992a) Co-authored-by: Brett Cannon <brett@python.org>