Error evaluating numbers starting in zero

Moshe Zadka moshez at zadka.site.co.il
Mon Dec 18 01:16:15 EST 2000


On Sun, 17 Dec 2000, "Richard P. Muller" <rpm at wag.caltech.edu> wrote:

> 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().
-- 
Moshe Zadka <sig at zadka.site.co.il>
This is a signature anti-virus. 
Please stop the spread of signature viruses!




More information about the Python-list mailing list