Re: Dictionary invalid token error

2007-10-02 Thread brad
Tim Chase wrote: > Numbers with leading zeros are parsed as octal. 8 and 9 are invalid > digits in octal. Thus, it falls over. 00 through 07 will work fine, > but 08 and 09 will go kaput. > > http://docs.python.org/ref/integers.html > > -tkc Thanks... that makes sense. I'll store them as st

Re: Dictionary invalid token error

2007-10-02 Thread Richard Brodie
"brad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why does 09 cause an invalid token while 9 does not? 9 isn't a valid octal digit. You probably want to use strings for storing telephone number like codes, if leading zeroes are significant. -- http://mail.python.org/mailma

Re: Dictionary invalid token error

2007-10-02 Thread Tim Chase
> 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 "", line 1 > area_group = {001:06, 002:04, 003:04, 006:09} > SyntaxError: invalid token > > Why does