-
-
Couldn't load subscription status.
- Fork 33.2k
Docs: Fix some semantic usages of iterator.__iter__
#130172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The reference to `__iter__` method seems to mean `object.__iter__`, not `iterator.__iter__`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the iterator term, we have:
Iterator are required to have an :meth:`~iterator.__iter__` method that returns the iterator
which is correct. Can you check if there are other mentions to iterator.__iter__ when we actually mean object.__iter__?
|
I also looked for some other files and found some incorrect links in |
iterator.__next__
iterator.__next__iterator.__iter__
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope we don't have more __iter__ usages. If you want, you can perhaps look at the other __iter__ usages that were actually iterator.__iter__ and not object.__iter__ or not !__iter__ and vice-versa?
|
All of these usages are correct except as corrected in this PR. (Some of them are |
|
Thanks @koyuki7w for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`. (cherry picked from commit 4d3a7ea) Co-authored-by: Yuki Kobayashi <[email protected]>
|
GH-130543 is a backport of this pull request to the 3.13 branch. |
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`. (cherry picked from commit 4d3a7ea) Co-authored-by: Yuki Kobayashi <[email protected]>
|
GH-130544 is a backport of this pull request to the 3.12 branch. |
…) (GH-130543) These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`. (cherry picked from commit 4d3a7ea) Co-authored-by: Yuki Kobayashi <[email protected]>
…) (GH-130544) These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`. (cherry picked from commit 4d3a7ea) Co-authored-by: Yuki Kobayashi <[email protected]>
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`.
The reference to
__iter__method seems to meanobject.__iter__, notiterator.__iter__.📚 Documentation preview 📚: https://cpython-previews--130172.org.readthedocs.build/