[Python-Dev] Re: Decimal data type issues
FBatista at uniFON.com.ar
Tue Apr 13 17:23:29 EDT 2004
#- Make hash(Decimal('123.1')) == hash(Decimal('123.1')) .. there is no
I'm pretty sure that those two hash will return the same value, as long have
the same argument (?).
#- hash(float(1.0)) == hash(Decimal(1)) comes for free, because
#- hash(float(1.0)) == hash(1). For the few other non-integer numbers
#- that can be accurately represented as floating point, it might make
#- sense to keep the same property? Though I suppose that is pretty
#- what-the-heck-does-C-do specific, so I wouldn't blame anyone if this
#- property couldn't be maintained.
OK, so I won't promise it.
More information about the Python-Dev