From 5df248c0d5b67e1df4279f039384bb7e10423d4c Mon Sep 17 00:00:00 2001 From: Andrea Censi Date: Sat, 26 Feb 2022 12:40:14 +0100 Subject: more exercises --- src/act4e_solutions/maps.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/act4e_solutions/maps.py') diff --git a/src/act4e_solutions/maps.py b/src/act4e_solutions/maps.py index 8f161f4..aff881f 100644 --- a/src/act4e_solutions/maps.py +++ b/src/act4e_solutions/maps.py @@ -1,4 +1,4 @@ -from typing import overload, TypeVar +from typing import TypeVar import act4e_interfaces as I @@ -8,18 +8,9 @@ C = TypeVar("C") class SolFiniteMapOperations(I.FiniteMapOperations): - @overload - def identity(self, s: I.FiniteSet[A]) -> I.FiniteMap[A, A]: - ... # this is just a type declaration - do not implement - @overload def identity(self, s: I.Setoid[A]) -> I.Mapping[A, A]: - ... # this is just a type declaration - do not implement - - def identity(self, s: I.Setoid[A]) -> I.Mapping[A, A]: - raise NotImplementedError() # implement here - - # + raise NotImplementedError() def compose(self, f: I.FiniteMap[A, B], g: I.FiniteMap[B, C]) -> I.FiniteMap[A, C]: raise NotImplementedError() -- cgit v1.2.1