Leading 0's syntax error in datetime.date module (Python 3.6)

Skip Montanaro skip.montanaro at gmail.com
Fri May 11 16:40:45 EDT 2018


>
> And, if it is really necessary to retain
> octal, why not preface it with anything BUT a "0".
>

I believe "0o" offers some symmetry with the "0x" prefix used for hex
literals. (And "0b" for binary.) It's a bit unfortunate that zero and
capital "oh" are visually so similar. Not much to be done about that at
this point. Just avoid upper case for all three prefixes.

Skip



More information about the Python-list mailing list