Almost There - os.kill()

Carsten Haese carsten at uniqsys.com
Mon Sep 24 07:55:35 EDT 2007


On Mon, 2007-09-24 at 19:48 +0800, Delaney, Timothy (Tim) wrote:
> Always be careful with int() incase any of the values have a leading
> zero - check the documentation for int() carefully.

Why would leading zeroes be a problem?

>>> int("10")
10
>>> int("010")
10
>>> int("0010")
10
>>> int("00010")
10

Maybe you're thinking of "evil eval?"

>>> eval("10")
10
>>> eval("010")
8

-- 
Carsten Haese
http://informixdb.sourceforge.net





More information about the Python-list mailing list