def _richcmp(self, other, op):
    if isinstance(other, numbers.Rational):
        return op(F.from_float(self.value), other)
    elif isinstance(other, DummyFloat):
        return op(self.value, other.value)
    else:
        return NotImplemented
def _richcmp(self, other, op):
    if isinstance(other, numbers.Rational):
        return op(F.from_float(self.value), other)
    elif isinstance(other, DummyFloat):
        return op(self.value, other.value)
    else:
        return NotImplemented