Login
📚 Introduction to Python Programming
Chapters ▾
⇩ Download ▾

13.4 Hierarchical inheritance

Learning objectives

By the end of this section you should be able to

  • Label relationships between classes as types of inheritance.
  • Construct classes that form hierarchical inheritance.

Hierarchical inheritance basics

Hierarchical inheritance is a type of inheritance in which multiple classes inherit from a single superclass. Multilevel inheritance is a type of inheritance in which a subclass becomes the superclass for another class. Combining hierarchical and multilevel inheritance creates a tree-like organization of classes.

Implementing hierarchical inheritance

Multiple classes can inherit from a single class by simply including the superclass name in each subclass definition.