This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients cubinator, martin.panter
Date 2017-03-07.21:47:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488923246.89.0.545193922108.issue29751@psf.upfronthosting.co.za>
In-reply-to
Content
My guess is this is supposed to emulate (or is actually the implementation of) the "int" constructor and the Python syntax. In these cases, numbers with leading zeros are disallowed. This was to help with Python 2 porting, where a leading zero specified an octal number.

>>> 010
    010
      ^
SyntaxError: invalid token
>>> int("010", 0)
ValueError: invalid literal for int() with base 0: '010'

Maybe it is better to fix the documentation.
History
Date User Action Args
2017-03-07 21:47:26martin.pantersetrecipients: + martin.panter, cubinator
2017-03-07 21:47:26martin.pantersetmessageid: <1488923246.89.0.545193922108.issue29751@psf.upfronthosting.co.za>
2017-03-07 21:47:26martin.panterlinkissue29751 messages
2017-03-07 21:47:26martin.pantercreate