First page Back Continue Last page Overview Graphics

Multiple Inheritance

A class definition with multiple base classes can be defined like this:

class DerivedClassName(Base1, Base2, Base3):

<statement-1>

.

.

.

<statement-N>

If an attribute is not found in the class DerivedClassName, it is searched for in Base1, then (recursively) in the base classes of Base1, and only if it is not found there, the search continues in Base2, and so on.