(self, other)
| 247 | return hash((self.op, data)) |
| 248 | |
| 249 | def __lt__(self, other): |
| 250 | if isinstance(other, Expr): |
| 251 | if self.op is not other.op: |
| 252 | return self.op.value < other.op.value |
| 253 | if self.op in (Op.TERMS, Op.FACTORS): |
| 254 | return (tuple(sorted(self.data.items())) |
| 255 | < tuple(sorted(other.data.items()))) |
| 256 | if self.op is Op.APPLY: |
| 257 | if self.data[:2] != other.data[:2]: |
| 258 | return self.data[:2] < other.data[:2] |
| 259 | return tuple(sorted(self.data[2].items())) < tuple( |
| 260 | sorted(other.data[2].items())) |
| 261 | return self.data < other.data |
| 262 | return NotImplemented |
| 263 | |
| 264 | def __le__(self, other): return self == other or self < other |
| 265 |
nothing calls this directly
no outgoing calls
no test coverage detected