Interface segregation
The interface segregation principle (ISP) provides some guidelines for an idea that we have revisited quite repeatedly already: that interfaces should be small.
In object-oriented terms, an interface is represented by the set of methods and properties an object exposes. That is to say that all the messages that an object is able to receive or interpret constitute its interface, and this is what other clients can request. The interface separates the definition of the exposed behavior for a class from its implementation.
In Python, interfaces are implicitly defined by a class according to its methods. This is because Python follows the so-called duck typing principle.
Traditionally, the idea behind duck typing was that any object is really represented by the methods it has, and by what it is capable of doing. This means that, regardless of the type of the class, its name, docstring, class attributes, or instance attributes, what ultimately defines...