25 Jul
2003
25 Jul
'03
3:18 p.m.
Scott> I've been seeing a lot of "we'll have to use float(123)/100" Scott> messages floating around, and I'd like to point out there is an Scott> atof-able form for floating point numbers: Scott> 256.7654e-7 = 2567654e-11 This isn't a general solution because when that floating point number is marshalled for storage in the .pyc file it will be normalized and contain a decimal point: >>> f = 2567654e-11 >>> f 2.567654e-05 >>> import marshal >>> marshal.dumps(f) 'f\x0c2.567654e-05' Skip