Re: Is Python terribly slow ?

Tim Peters (tim@ksr.com)
Sat, 05 Feb 94 13:25:50 EST

> [guido]
> Yesterday I wrote that Helmut's problem was probably concentrated in
> atoi() and atof(). I sent him a patch to stropmodule.c that
> implemented these two in C [& it worked great & will go in patch #1]

Note that the current string.atof doesn't always return a float:

>>> 4/string.atof('5')
0
>>> type( string.atof('5') )
<type 'int'>
>>>

I expect that a side-effect of reimplementing it in C is that atof will
always return a float (given legit input). True?

hopefully y'rs - tim

Tim Peters tim@ksr.com
not speaking for Kendall Square Research Corp