-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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-37913: document that __length_hint__ can return NotImplemented #15383
Conversation
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.
Thanks for the PR @jdemeyer!
I approve of the section added, I just have a minor formatting suggestion:
@jdemeyer Could you apply the suggested change so we can merge? Or else select the "Allow edits from maintainers" checkbox on the right hand side and let us know so we can finish it off. |
It was already checked :-) |
As far as I'm aware, that option is supposed to allow anyone with write access to the repository to directly commit suggestions to the PR branch. But, it doesn't always work correctly in my experience. The GitHub interface may not be recognizing that I made an actual suggestion, since I chose "Approve" when I added my review instead of "Request changes" or "Comment". I'll try to do it again, but instead select the "Request changes" option this time. |
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.
Deleted my previous suggestion and changed the review option to "Request changes". That might allow the suggestion to be directly added to the PR branch.
The length must be an integer ``>=`` 0. This method is purely an | ||
optimization and is never required for correctness. | ||
The length must be an integer ``>=`` 0. The return value may also be | ||
*NotImplemented*, which is treated the same as if the ``__length_hint__`` |
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.
*NotImplemented*, which is treated the same as if the ``__length_hint__`` | |
:const:`NotImplemented`, which is treated the same as if the ``__length_hint__`` |
No, the original submitter has to select the checkbox on the right to allow maintainers to push changes to their branch. We think it changed from default-checked to default-unchecked at some point. I'll just merge this and then apply your suggestion myself. |
Oh, just spotted Jeroen's comment in amongst all the rest of the boxes here (still not a fan of this UI...). Weird that it wasn't working, but it's done now so 🤷♂️ |
…ythonGH-15383) (cherry picked from commit ed99bb9) Co-authored-by: Steve Dower <steve.dower@python.org>
CC @aeros167
https://bugs.python.org/issue37913