>>>>f(01)
> 43
>>>>f(02)
> 44
>>>>f(010)
> 50
>>>>42+010
> 50

Literal ints with lead 0 are interpreted as octal numbers (base 8) instead 
of decimal numbers (base 10).  01==1 either way, but 010 == 8.
>>> 010
8

0x (zero eks) prefix indicate hexadecimal numbers:
>>> 0xff
255

Terry Jan Reedy



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to