- Python supports all the four types of inheritance : Single, Multiple, Hierarchical and Multilevel
- If during multiple inheritance there are two classes that have the same method then from method from the class that is inherited first by the child will only be available
- Private attributes from the parent class cannot be accessed in the child class
- When an method in the parent class is redefined in the child class it is called as Method Overriding
Accessing Base Class Constructor/ Methods
The constructor/ methods of the parent class can be accessed using the super()
keyword
When super() of an method/ property is called Python looks up the Class MRO (Method Resolution Order) and calls the method/ property that is next in the list
Helpful in understanding the order in which the method/ property will be called when using multiple inheritance
Inheritance in Python with Types and Examples - Python Geeks