summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-04-29 16:19:28 +0200
committerNao Pross <np@0hm.ch>2024-04-29 16:19:28 +0200
commit08d95432601d1fef60867673746056f55e191092 (patch)
tree66214a9bb742daad54969a60068ad9f5ee55d571
parentRemove debug print (diff)
downloadpolymatrix-08d95432601d1fef60867673746056f55e191092.tar.gz
polymatrix-08d95432601d1fef60867673746056f55e191092.zip
Make IndexRange for ExpresssionState sortable by start value
Diffstat (limited to '')
-rw-r--r--polymatrix/expressionstate/mixins.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/polymatrix/expressionstate/mixins.py b/polymatrix/expressionstate/mixins.py
index b80669f..f937137 100644
--- a/polymatrix/expressionstate/mixins.py
+++ b/polymatrix/expressionstate/mixins.py
@@ -16,6 +16,9 @@ class IndexRange(NamedTuple):
start: int
end: int
+ def __lt__(self, other):
+ return self.start < other.start
+
class ExpressionStateMixin(
StateCacheMixin,