A RetroSearch Logo

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

Search Query:

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

[Python-Dev] Decimal data type issues

[Python-Dev] Decimal data type issuesBatista, Facundo FBatista at uniFON.com.ar
Tue Apr 13 14:10:33 EDT 2004
[Michael Hudson]
#- > Should the following be true?::
#- >
#- >   hash(Decimal(25) == hash(25)
#- >   hash(Decimal.from_float(25.35) == hash(25.35)
#- >   hash(Decimal('-33.8')) == hash(-33.8)
#- 
#- Well, if Decimal(25) == 25, they'd better hash the same!  If 
#- not, then
#- what's the point?

Remember that you only can compare Decimal to ints or long, not float nor
string.

So, This way, hash() must *only* return the same value than the equivalent
integer.

I'm ok with this.

.	Facundo

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