Python – Inheritance
Resources
Read or watch:
- Inheritance
- Multiple inheritance
- Inheritance in Python
- Learn to Program 10 : Inheritance Magic Methods
Learning Objectives
At the end of this project, you are expected to be able to explain to anyone, without the help of Google:
General
- What is a superclass, baseclass or parentclass
- What is a subclass
- How to list all attributes and methods of a class or instance
- When can an instance have new attributes
- How to inherit class from another
- How to define a class with multiple base classes
- What is the default class every class inherit from
- How to override a method or attribute inherited from the base class
- Which attributes or methods are available by heritage to subclasses
- What is the purpose of inheritance
- What are, when and how to use
isinstance
,issubclass
,type
andsuper
built-in functions