A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/044225.html below:

[Python-Dev] Decimal data type issues

[Python-Dev] Decimal data type issues [Python-Dev] Decimal data type issuesShane 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4