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 mark.dickinson
Recipients mark.dickinson, steven.daprano
Date 2018-04-18.07:30:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
For the message:

> invalid token, use 0o prefix for octal integers

I'd expect (without having any evidence to back this up) that the majority of people who encounter this error would be those who intended a decimal literal rather than an octal one, in which case an error message that talks about octal might be confusing.

    >>> import datetime
    >>> birthday = datetime.datetime(1912, 06, 23)
      File "<stdin>", line 1
        birthday = datetime.datetime(1912, 06, 23)
    SyntaxError: invalid token

Could we cover both cases in a single message? "leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers"
Date User Action Args
2018-04-18 07:30:42mark.dickinsonsetrecipients: + mark.dickinson, steven.daprano
2018-04-18 07:30:42mark.dickinsonsetmessageid: <>
2018-04-18 07:30:42mark.dickinsonlinkissue33305 messages
2018-04-18 07:30:42mark.dickinsoncreate