08 and 09 in sequence create "invalid token" error?!

Wojciech Muła wojciech_mula at poczta.null.onet.pl.invalid
Fri Apr 6 19:15:01 EDT 2007


IamIan wrote:
> I am confused as to why including 08 or 09 in a sequence (list or
> tuple) causes this error. All other numbers with a leading zero work.

All literals that start with "0" digit are considered as
octal numbers, i.e. only digits "0".."7" are allowed.

See octinteger lexical definition:
http://docs.python.org/ref/integers.html

w.



More information about the Python-list mailing list