[Python-Dev] Decimal <-> float comparisons in py3k.

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Mar 20 01:10:25 CET 2010

Nick Coghlan wrote:
> Mark Dickinson wrote:

> It seems to me that given the existing conflation of numeric equivalence
> and containment testing, going the whole hog and fixing the set
> membership problem for all of our rational types would be the right
> thing to do.

Isn't this only solving half the problem, though? Even if
you find that the hashes are equal, you still have to decide
whether the values themselves are equal.

Is there some similarly clever way of comparing two
rational numbers without having explicit access to the
numerators and denominators?


More information about the Python-Dev mailing list