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

Thomas Guettler hv at tbz-pariv.de
Thu Jan 8 04:34:21 EST 2009


Hi,

07 is octal. That's way 08 is invalid. Try this:

===> python
>>> print 011
9
>>> print int('011')
11




-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de



More information about the Python-list mailing list