Error evaluating numbers starting in zero
entropiamax at jazzfree.com
Mon Dec 18 12:09:52 CET 2000
The numbers starting with 0 are octal (and with 0x hexadecimal).
08 doesn't exist in octal and this is a error.
8 is 010 in octal:
Mike Brenner escribió:
> >> I have a python checkbook program that evaluates date strings, such
> >> as "01/31/99". Most dates are fine, but if I have a date such as
> >> "01/08/99", python runs into an error when it tries to eval("08").
> > Use int() instead of eval().
> So, that may also explain the failure with
> i = 08
> and with reading in numbers,
> the python interpretor must be using EVAL instead of INT?
More information about the Python-list