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

Wojciech Muła wojciech_mula at poczta.null.onet.pl.invalid
Sat Apr 7 01:15:01 CEST 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