...

/

Multiple Inheritance in Python

Multiple Inheritance in Python

Learn how Python utilizes MRO for multiple inheritance, and how multiple inheritance enables mixins.

We'll cover the following...

Python supports multiple inheritance. Because inheritance, when improperly used, leads to design problems, we could also expect that multiple inheritance will also yield even bigger problems when it's not correctly implemented.

Multiple inheritance is, therefore, a double-edged sword. It can also be very beneficial in some cases. Just to be clear, there is nothing wrong with multiple inheritance—the only problem it has is that when it's not implemented correctly, it will multiply the problems.

Multiple inheritance is a perfectly valid solution when used correctly, and this opens up new patterns and mixins. Perhaps one of the most powerful applications ...