Skip to content

bpo-14995: Clarify in PyLong_FromString that digits should be ended by a null byte #26774

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

Closed
wants to merge 1 commit into from

Conversation

cryvate
Copy link
Contributor

@cryvate cryvate commented Jun 17, 2021

Clarify in PyLong_FromString that digits should be ended by a null byte.

Ryan Kelly (see BPO) made an original patch, but I started from scratch as I wanted to make minimal change to the current text, whereas he had restructured it.

Don't think this requires a news item.

https://bugs.python.org/issue14995

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jul 18, 2021
@MaxwellDupre
Copy link
Contributor

Leading and trailing spaces are ignored, hence text should be something like:

Leading and trailing spaces and single underscores after a base specifier
and between digits are ignored. If there are no digits or
the digits are not ended by a null byte, :exc:ValueError
will be raised.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Could you rewrite this to something inspired by Josh Rosenberg's message on the linked bug? As he says, the current text doesn't make much sense since C strings always end on a null byte.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@hauntsaninja
Copy link
Contributor

Closing in favour of #94363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants