Inheritance in python
Inheritance is a powerful feature of object-oriented programming (OOP) that allows a class to inherit attributes and methods from a parent class. This allows you to create a new class that is a modified version of an existing class, without having to rewrite the entire class from scratch. Other than saving you a lot of time and effort, it also helps you to avoid duplication of code. Stay hooked as we dive into how to implement inheritance in python.
- Inheritance
- Multiple inheritance
- Inheritance in python
- Learn to program 10: Inheritance
- Youtube
At the end of the project, you are expected to be able to explain to anyone without the help of Google the following concepts
- 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
- What is the default class every class inherit from
- 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