Against PEP 240

Robin Becker robin at jessikat.fsnet.co.uk
Wed May 30 01:16:24 CEST 2001


In article <9f16bs07h2 at enews2.newsguy.com>, Alex Martelli
<aleaxit at yahoo.com> writes
...
>
>Exactly!  The extension isn't disturbed one bit: when it calls
>its PyFloat_AsDouble's, exactly like today, there may be
>some conversion (nb->nb_float(op) is called, where nb is the
>PyNumberMethods* obtained by op->ob_type->tp_as_number)
>if needed (if it uses PyFloat_AS_DOUBLE instead, it's arguably
>broken already...:-).  The *Python sources* using the extension
>will be a bit slowed down until and unless you find the time to
>run a script on them all to change your \d+\.\d+'s by appending
>an F to them.  Is that your definition of "bust"...?
...
the whole point is to avoid doing that if at all possible. The real
speed freaks really don't want to do any extra conversions even though
to take full advantage of python they probably ought to.

Doing extra conversions on all those data files would be a bit of a
problem. When I read my csv files they normally have floats in and I
wouldn't really want to do the extra work unless it's forced on me.
That's what the PEP will do.


....
>And would that improve your quality of life noticeably when
>compared to the I(1,2) notation for the same thing that you can
>already use today...?
>
...
the same argument applies exactly to rationals.
-- 
Robin Becker



More information about the Python-list mailing list