--- fractions.py.orig 2009-06-22 07:17:00.000000000 -0700 +++ fractions.py 2009-07-07 19:52:42.000000000 -0700 @@ -503,10 +503,9 @@ if isinstance(b, float): return a == a.from_float(b) else: - # XXX: If b.__eq__ is implemented like this method, it may - # give the wrong answer after float(a) changes a's - # value. Better ways of doing this are welcome. - return float(a) == b + # Since a doesn't know how to compare with b, let's + # give b a chance to compare itself with a. + return NotImplemented def _subtractAndCompareToZero(a, b, op): """Helper function for comparison operators.