AI engineering glossary · Python advanced

What is subclass?

Subclass (also called Child class, Derived class): A class that inherits from another class, gaining its behaviour and adding or changing parts. Objects of a subclass can be used wherever the parent class is expected. It is the counterpart of a parent class in an inheritance relationship.

Level: intermediateTopic: Python advanced

Subclass: an example

class ElectricCar(Car) is a subclass; an ElectricCar object still answers to Car methods like drive().

Related terms

More Python advanced terms

Where you learn it

Subclass 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.