(self, other, op)
| 29 | self.value = value |
| 30 | |
| 31 | def _richcmp(self, other, op): |
| 32 | if isinstance(other, numbers.Rational): |
| 33 | return op(F.from_float(self.value), other) |
| 34 | elif isinstance(other, DummyFloat): |
| 35 | return op(self.value, other.value) |
| 36 | else: |
| 37 | return NotImplemented |
| 38 | |
| 39 | def __eq__(self, other): return self._richcmp(other, operator.eq) |
| 40 | def __le__(self, other): return self._richcmp(other, operator.le) |