[docs] [issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0

Terry J. Reedy report at bugs.python.org
Thu Mar 30 16:29:01 EDT 2017


Terry J. Reedy added the comment:

String arguments to int are quoted int literals.  From
https://docs.python.org/3/reference/lexical_analysis.html#literals
'Underscores are ignored for determining the numeric value of the literal. They can be used to group digits for enhanced readability. One underscore can occur between digits, and after base specifiers like 0x.'

For your patch, I would summarize this by expanding 'Leading spaces are ignored.' to the following (in patch comment also).
"Leading spaces and single underscores after a base specifier and between digits are ignored."

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29751>
_______________________________________


More information about the docs mailing list