AI engineering glossary · Python advanced
What is multiple inheritance?
Multiple inheritance: A class design where a class lists more than one parent, combining behaviour from each. Python resolves name clashes with the method resolution order. It is powerful but can make code hard to follow if overused.
Multiple inheritance: an example
class Trainer(LoggingMixin, BaseModel) gets logging methods from one parent and model methods from the other.
Related terms
- Mixin
- Method resolution order
- Diamond problem
- Inheritance
More Python advanced terms
Where you learn it
Multiple inheritance is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.