2 ms·
Why not use a decorator for that? @impl(Sheep, Animal) class ImplAnimalForSheep: ... or something? It probably needn't even be a separate cla
by OJFord 5y ago
Why not use a decorator for that?
@impl(Sheep, Animal)
class ImplAnimalForSheep:
...
or something?
It probably needn't even be a separate class - just decorate the relevant methods (or the `Sheep` class itself) `@impl(Animal)` and check the necessary ones are implemented on instantiation.