[Python-ideas] Python3.3 Decimal Library Released
Mark H. Harris
harrismh777 at gmail.com
Mon Mar 3 18:10:07 CET 2014
On Monday, March 3, 2014 10:52:01 AM UTC-6, Oscar Benjamin wrote:
>
>
> This is an interesting suggestion. It's hard to judge how much code
> would be broken by such an explicit change. A preliminary less
> controversial step would just be to introduce decimal literals e.g
> 1.23d.
>
> If there was a desire to add these then there's no reason why they
> would have to wait until the (hypothetical) release of Python 4.x.
> However I doubt that they would be accepted without having first spent
> some time maturing on PyPI and certainly not without unit tests.
>
Oscar, sounds right. I would like to see it just the other way round. We
have a very speedy decimal module, its 2014, and we just don't need any
more of this:
>>> from decimal import *
>>> Decimal(.1)
Decimal('0.1000000000000000055511151231257827021181583404541015625')
>>>
I'm from back in that day. You know, about 1982. We've embedded floats and
doubles
in everything from the processor to python and beyond. Memory is cheap,
technology
has advanced (heck, python is one of the coolest most sophisticated
languages on
the planet), its time to use decimal floating point. I'm thinking we ought
to have decimal
by default, and the binary literal 1.23b as the option.
As far as how much code breaks; who knows, but it can't be any worse than
moving
from 2.7.x to 3.3.4. I mean, everyone thought that was going to break the
world, and
people have adapted just fine. Some folks are staying put on 2.7.6 (and
that's fine) and
some folks like me are out there on the bloody edge downloading 3.3.5 !
Thanks for the discussion Oscar.
marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140303/cdc8356b/attachment-0001.html>
More information about the Python-ideas
mailing list