A mixin class supplies reusable behavior through inheritance rather than acting as a complete standalone type. Python commonly uses mixin, or addin, classes with multiple inheritance. section 15.13
Keep mixin-based designs practical by following these constraints:
- Prefer readable inheritance arrangements and avoid name clashes. section 15.13
- Treat deep or overly complex inheritance hierarchies as a maintenance risk. section 15.13
- Remember that Python's method lookup and cooperative super calls become more significant in complex hierarchies. section 15.13
class E:
. . .
class F:
. . .
class G:
. . .
class D(G):
. . .
class C:
. . .
class B(E, F):
. . .
class A(B, C, D):
. . .
Use the inheritance listing to trace how several base classes can combine in a multiple-inheritance arrangement. section 15.13



