Python Negatypes

from blog Blog on Hillel Wayne, | ↗ original
Back in 2007 Python added Abstract Base Classes, which were intended to be used as interfaces: from abc import ABC class AbstractIterable(ABC): @abstractmethod def __iter__(self): while False: yield None def get_iterator(self): return self.__iter__() ABCs were added to strengthen the duck typing a little. If you inherited AbstractIterable, then...