Abstract Base Classes¶
Abstract base classes complement duck-typing by providing a way to define interfaces when other techniques like hasattr() would be clumsy or subtly wrong (for example with magic methods).
Protocol classes provide a support for structural subtyping (static duck typing).