fractions.Fraction._richcmp

Fraction._richcmp(other, op)[source]

Helper for comparison operators, for internal use only.

Implement comparison between a Rational instance self, and either another Rational instance or a float other. If other is not a Rational instance or a float, return NotImplemented. op should be one of the six standard comparison operators.