Against PEP 240

Paul Boddie paul at boddie.net
Wed May 30 06:55:31 EDT 2001


"Delaney, Timothy" <tdelaney at avaya.com> wrote in message news:<mailman.991184744.16354.python-list at python.org>...
> 
> I would much prefer that the default be for exact representation (not FP,
> not BCD, but exact), and to get something else (perhaps as a speed
> optimisation) should require additional syntax.

Yes. Remember the issues that came up when the output of repr was
changed for Python 2.0 (or was it 2.1?)? 7.35 wasn't 7.35 any more:

>>> 7.0
7.0
>>> 7.35
7.3499999999999996

How bizarre is that?

[...]

> Python has the opportunity to do away with this wart, the wart being that FP
> is the default for non-integer numbers.

Surely the speed demons all use the Numeric extension for performance
arithmetic anyway? In any case, it would be really nice to unify the
entire "numeric type spectrum" so that seemingly arbitrary
distinctions no longer exist. Personally, I think it would be superb
if that old chestnut...

>>> 8/3
2

...had something done about it too. Of course, this could be too much
of a shock for a lot of programs out there, even if it were to be
introduced far into the __future__. ;-) Perhaps we should start
lobbying for mxMoney now... ;-)

Paul



More information about the Python-list mailing list