Inheritance in OOP ================== .. index:: ! inheritance, ! subtyping **Inheritance** is the second of the **Four Pillars of Object-Oriented Programming** that we encounter. Here’s a definition: inheritance is a mechanism within object-oriented programming that allows one class to be based on another class, thus receiving its properties and behaviors. .. note:: Inheritance is also sometimes referred to as **subtyping**.