(self, other)
| 19 | return self.value == other.value |
| 20 | |
| 21 | def __ne__(self, other): |
| 22 | if isinstance(other, int): |
| 23 | other = Serial(other, self.bits) |
| 24 | elif not isinstance(other, Serial) or other.bits != self.bits: |
| 25 | return NotImplemented |
| 26 | return self.value != other.value |
| 27 | |
| 28 | def __lt__(self, other): |
| 29 | if isinstance(other, int): |