AI engineering glossary · Python advanced
What is inheritance?
Inheritance: A mechanism where a new class takes on the attributes and methods of an existing class and may add or change some. It supports code reuse and expresses an 'is-a' relationship between a general class and a specialised one.
Inheritance: an example
class SavingsAccount(Account): adds interest handling while reusing deposit and withdraw from Account.
Related terms
More Python advanced terms
Where you learn it
Inheritance is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.