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.

Level: beginnerTopic: Python advanced

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.