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
bpo-45250: fix docs regarding __iter__
and iterators
#29170
base: main
Are you sure you want to change the base?
Conversation
Misc/NEWS.d/next/Documentation/2021-10-22-12-09-18.bpo-45250.Iit5-Y.rst
Outdated
Show resolved
Hide resolved
I'm strongly opposed to changing the meaning of a term that has had a clear definition for decades (and is implemented as Addendum: As a typeshed maintainer I see the problem of ill-defined terms and protocols in Python everyday ("file-like objects" are my personal bane). Making existing clear definitions less clear is not the right way forward. |
The issue is the definition as written down is wrong/inaccurate from the perspective of Python itself. So it isn't that this redefines a term as much as actually makes the glossary reflect the real world as to how Python itself uses and considered what iterators are (i.e. this properly reflects what And I don't quite understand how the definition is ambiguous? An iterator defines What's your proposal otherwise? To create a brand new term of what e.g. a Do note that Guido and other folks agree with this plan in https://mail.python.org/archives/list/[email protected]/thread/3W7TDX5KNVQVGT5CUHBK33M7VNTP25DZ/#3W7TDX5KNVQVGT5CUHBK33M7VNTP25DZ, so this isn't entirely without discussion and some agreement. We can ask the SC to make a final call on this if you really want to (I will abstain from voting on it if it comes to that). |
(I'll use the terms "partial iterator" for objects just defining I'm not looking at this from the perspective how this is implemented in Python, but from a user's perspective. I don't think it's correct to say Python considers an iterator to have only Practically, the status quo (some function, methods, statements don't require I see two solutions to this problem:
|
I think this is where our views are differing. It's an unfortunate side-effect/bug, from my perspective, that because In other words I don't view Maybe this is suggesting it's time to have a lower-level |
The relevant python-dev thread doesn't seem to have reached consensus and died out. |
https://bugs.python.org/issue45250
The text was updated successfully, but these errors were encountered: