diff options
Diffstat (limited to '')
-rw-r--r-- | src/act4e_solutions/sets_sum.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/act4e_solutions/sets_sum.py b/src/act4e_solutions/sets_sum.py index f36cec1..19f1969 100644 --- a/src/act4e_solutions/sets_sum.py +++ b/src/act4e_solutions/sets_sum.py @@ -4,7 +4,7 @@ import act4e_interfaces as I X = TypeVar("X") C = TypeVar("C") -E = Tuple[int, C] +E = List # Tuple[int, C] class MyFiniteSetDisjointUnion(I.FiniteSetDisjointUnion[C, E]): _components: List[I.FiniteSet[C]] @@ -28,7 +28,7 @@ class MyFiniteSetDisjointUnion(I.FiniteSetDisjointUnion[C, E]): es = [] for i, c in enumerate(self._components): for e in c.elements(): - es.append((i, e)) + es.append([i, e]) return es @@ -42,7 +42,7 @@ class MyFiniteSetDisjointUnion(I.FiniteSetDisjointUnion[C, E]): if not self._components[i].contains(e): raise I.InvalidValue - return (i, e) + return [i, e] def unpack(self, e: E) -> Tuple[int, C]: return tuple(e) |