int() should be extended?

Bernhard Herzog bh at intevation.de
Mon Oct 21 12:21:47 EDT 2002


Xiao-Qin Xia <xx758 at cam.ac.uk> writes:

> since use exec is not so good a habit, is there any other way to convert 
> "0x41" to 65 (0x41)?, or int() should be extened to do this job?

>>> int("0x41", 16)
65

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                           http://www.mapit.de/



More information about the Python-list mailing list