Composition over inheritance in Python
Both inheritance and composition are tools for code re-use in object-oriented programming. I explained the different concepts inheritance and composition follow for modelling relationships between types. I demonstrated how we can refactor an application from my python-super blog post, that was based on cooperative multiple inheritance, to use composition instead to achieve a more flexible and robust design.