[Python-Dev] Decimal data type issues
Shane Hathaway
shane at zope.com
Tue Apr 13 16:09:35 EDT 2004
Bob Ippolito wrote:
> As far as arbitrary floats hashing equally, I don't really care, but the
> simple ones definitely should. Hopefully at some point, "float
> constants" (as in coming from source code or user input) in Python will
> actually be Decimal representations, so you don't lose precision until
> you ask for it.
Should we expect this to work?
d = {}
d[Decimal('1.1')] = 1
print d[float('1.1')]
Maybe pathological, maybe not.
Shane
More information about the Python-Dev
mailing list