eval('07') works, eval('08') fails, why?

Grant Edwards invalid at invalid
Thu Jan 8 16:46:26 CET 2009

On 2009-01-08, Alex van der Spek <amvds at xs4all.nl> wrote:

> Thanks much, that makes sense!

Well, that's the correct explanation.

Whether that feature makes sense or not is debatable.  Even I'm
not old-school enough that I ever use octal literals -- and I
used Unix on a PDP-11 for years (actually had my own PDP-11 for
while, but it never worked).  Now that I think of it, my
Heathkit Z80 stuff used octal notation too.

Grant Edwards                   grante             Yow! I represent a
                                  at               sardine!!

More information about the Python-list mailing list