diff options
author | Brett Cannon <brett@python.org> | 2021-11-20 00:40:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-20 00:40:34 (GMT) |
commit | be36e0634060c7d5dee8e8876fb888bbb53d992a (patch) | |
tree | dcf28e3105e12b272cdca00de2b260dec6805183 /Misc | |
parent | 4c616911b69ce07fb35da1721506bfaba0998c30 (diff) | |
download | cpython-be36e0634060c7d5dee8e8876fb888bbb53d992a.zip cpython-be36e0634060c7d5dee8e8876fb888bbb53d992a.tar.gz cpython-be36e0634060c7d5dee8e8876fb888bbb53d992a.tar.bz2 |
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__`.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Documentation/2021-10-22-12-09-18.bpo-45250.Iit5-Y.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Documentation/2021-10-22-12-09-18.bpo-45250.Iit5-Y.rst b/Misc/NEWS.d/next/Documentation/2021-10-22-12-09-18.bpo-45250.Iit5-Y.rst new file mode 100644 index 0000000..0c2bf18b --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-10-22-12-09-18.bpo-45250.Iit5-Y.rst @@ -0,0 +1,2 @@ +Update the documentation to note that CPython does not consistently +require iterators to define ``__iter__``. |