The Syntax and Terminologies
Learn how to use inheritance syntactically and the terminologies related to it.
We'll cover the following
The terminologies
In inheritance, in order to create a new class based on an existing class, we use the following terminology:
- Parent Class (Super Class or Base Class): This class allows the reuse of its public properties in another class.
- Child Class (Sub Class or Derived Class): This class inherits or extends the superclass.
A child class has all public attributes of the parent class.
Syntax
In Python, to implement inheritance, the syntax is quite similar to the basic class definition. The syntax is given below:
Get hands-on with 1200+ tech skills courses.