within python runtime environment, try the following:
>> *type(01207)*
you'll get:
<type 'int'>
then try with:
>> *type(01208)*
you will get:
File "<stdin>", line 1
type(01208)
^
within python runtime environment, try the following:
>> *type(01207)*
you'll get:
<type 'int'>
then try with:
>> *type(01208)*
you will get:
File "<stdin>", line 1
type(01208)
^
No it isn't a bug, by prefixing the number with 0
you are using octal and 8
is not a valid digit in base 8
.
>>> 07
7
>>> 08
SyntaxError: invalid token
>>> 010
8
Python 3 uses a 0o
prefix (only - you can do both in 2.7
) instead to remove this ambiguity.