Skip to content
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

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

jdemeyer
Copy link
Contributor

@jdemeyer jdemeyer commented Aug 22, 2019

Copy link
Contributor

@aeros aeros left a 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:

@zooba
Copy link
Member

zooba commented Sep 9, 2019

@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.

@jdemeyer
Copy link
Contributor Author

jdemeyer commented Sep 9, 2019

Or else select the "Allow edits from maintainers" checkbox on the right hand side

It was already checked :-)

@aeros
Copy link
Contributor

aeros commented Sep 10, 2019

@zooba:

Or else select the "Allow edits from maintainers" checkbox on the right hand side and let us know so we can finish it off.

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.

Copy link
Contributor

@aeros aeros left a 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__``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*NotImplemented*, which is treated the same as if the ``__length_hint__``
:const:`NotImplemented`, which is treated the same as if the ``__length_hint__``

@zooba
Copy link
Member

zooba commented Sep 10, 2019

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.

@zooba
Copy link
Member

zooba commented Sep 10, 2019

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 🤷‍♂️

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 10, 2019
…ythonGH-15383)

(cherry picked from commit ed99bb9)

Co-authored-by: Steve Dower <steve.dower@python.org>
zooba added a commit that referenced this pull request Sep 10, 2019
…H-15383)

(cherry picked from commit ed99bb9)

Co-authored-by: Steve Dower <steve.dower@python.org>
@jdemeyer jdemeyer deleted the doc_length_hint branch September 10, 2019 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants