Dictionary invalid token error

brad byte8bits at gmail.com
Tue Oct 2 10:49:57 EDT 2007


This works:

 >>> area_group = {001:06, 002:04, 003:04, 006:9}

This does not (one the end, 09 is used instead of 9)

 >>> area_group = {001:06, 002:04, 003:04, 006:09}
   File "<stdin>", line 1
     area_group = {001:06, 002:04, 003:04, 006:09}
SyntaxError: invalid token

Why does 09 cause an invalid token while 9 does not?

###############################################

Python 2.4.4 (#2, Apr  5 2007, 18:43:10)
[GCC 4.1.2 20061115 (prerelease) (Debian AMD64 4.1.1-21)] on linux2






More information about the Python-list mailing list