From 08d95432601d1fef60867673746056f55e191092 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 29 Apr 2024 16:19:28 +0200 Subject: Make IndexRange for ExpresssionState sortable by start value --- polymatrix/expressionstate/mixins.py | 3 +++ 1 file changed, 3 insertions(+) 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, -- cgit v1.2.1