diff options
author | Nao Pross <np@0hm.ch> | 2024-04-29 16:19:28 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-04-29 16:19:28 +0200 |
commit | 08d95432601d1fef60867673746056f55e191092 (patch) | |
tree | 66214a9bb742daad54969a60068ad9f5ee55d571 | |
parent | Remove debug print (diff) | |
download | polymatrix-08d95432601d1fef60867673746056f55e191092.tar.gz polymatrix-08d95432601d1fef60867673746056f55e191092.zip |
Make IndexRange for ExpresssionState sortable by start value
-rw-r--r-- | polymatrix/expressionstate/mixins.py | 3 |
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, |