(a, b)
a == b
a == b
a == b
def __eq__(a, b):
        """a == b"""
        if type(b) is int:
            return a._numerator == b and a._denominator == 1
        if isinstance(b, numbers.Rational):
            return (a._numerator == b.numerator and
                    a._denominator == b.denominator)
        if isinstance(b, numbers.Complex) and b.imag == 0:
            b = b.real
        if isinstance(b, float):
            if math.isnan(b) or math.isinf(b):
                # comparisons with an infinity or nan should behave in
                # the same way for any finite a, so treat a as zero.
                return 0.0 == b
            else:
                return a == a.from_float(b)
        else:
            # Since a doesn't know how to compare with b, let's give b
            # a chance to compare itself with a.
            return NotImplemented
def __eq__ ( a , b ) : if type ( b ) is int : return a . _numerator == b and a . _denominator == 1 if isinstance ( b , numbers . Rational ) : return ( a . _numerator == b . numerator and a . _denominator == b . denominator ) if isinstance ( b , numbers . Complex ) and b . imag == 0 : b = b . real if isinstance ( b , float ) : if math . isnan ( b ) or math . isinf ( b ) : # comparisons with an infinity or nan should behave in # the same way for any finite a, so treat a as zero. return 0.0 == b else : return a == a . from_float ( b ) else : # Since a doesn't know how to compare with b, let's give b # a chance to compare itself with a. return NotImplemented