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 <1524036642.71.0.682650639539.issue33305@psf.upfronthosting.co.za>
In-reply-to
Content
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"
History
Date User Action Args
2018-04-18 07:30:42mark.dickinsonsetrecipients: + mark.dickinson, steven.daprano
2018-04-18 07:30:42mark.dickinsonsetmessageid: <1524036642.71.0.682650639539.issue33305@psf.upfronthosting.co.za>
2018-04-18 07:30:42mark.dickinsonlinkissue33305 messages
2018-04-18 07:30:42mark.dickinsoncreate