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

IamIan iansan at gmail.com
Fri Apr 6 19:01:22 EDT 2007


Hello all,

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.

[01,02,03,04,05,06,07]  is fine
[01,02,03,04,05,06,07,10]  is fine

[01,02,03,04,05,06,08]  produces "SyntaxError: invalid token", as
does: [01,02,03,04,05,06,09]

I have tried this both in a script and in the interactive interpreter.
Using Python 2.3.4

Thanks!




More information about the Python-list mailing list