[Python-ideas] Python Float Update
Joonas Liik
liik.joonas at gmail.com
Mon Jun 1 16:52:35 CEST 2015
Having some sort of decimal literal would have some advantages of its own,
for one it could help against this sillyness:
>>> Decimal(1.3)
Decimal('1.3000000000000000444089209850062616169452667236328125')
>>> Decimal('1.3')
Decimal('1.3')
I'm not saying that the actual data type needs to be a decimal (
might well be a float but say shove the string repr next to it so it can be
accessed when needed)
..but this is one really common pitfall for new users, i know its easy to
fix the code above,
but this behavior is very unintuitive.. you essentially get a really
expensive float when you do the obvious thing.
Not sure if this is worth the effort but it would help smooth some corners
potentially..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150601/e24a40c8/attachment.html>
More information about the Python-ideas
mailing list