Odd behaviour of Python tokenizer when parsing integer numbers
I noticed the following fact with CPython3 and Pypy3, contrasting with the behaviour of both CPython2 and Pypy2: In Python3, it looks like leading zeros when parsing code yield an error except for a very single number wich is 0 . Thus 00 is valid but not 042 . In Python2, leading zeros are allowed for all integers. Thus 00 and 042 are valid. Why did Python change its behaviour between both versions? Python 3 standardized how all integer literals (other than base 10) were defined: 0?dddd... , where ? is a single letter indicating the base, and each d is interpreted as a digit in the appropriate