Leading 0's syntax error in datetime.date module (Python 3.6)
bartc
bc at freeuk.com
Sat May 12 07:00:59 EDT 2018
On 12/05/2018 05:29, Steven D'Aprano wrote:
> On Fri, 11 May 2018 16:56:09 +0100, bartc wrote:
>
>> 0100, if not intended as octal, is
>> an undetectable error in C and Python 2.
>
> How fortunate then that Python 2 is history (soon to be ancient history)
> and people can use Python 3 where that error of judgement has been
> rectified.
At least you're agreeing it was a mistake.
Although it does still mean that Python 3 has this funny quirk:
a = 00000 # ok
a = 00123. # ok
a = int("00123") # ok
a = 00123 # error
--
bartc
More information about the Python-list
mailing list