Python — From Basics to Advanced · Objects, Errors, Files
Inheritance
Objects, Errors, Files
Introduction
Inheritance lets you build a new class on top of an existing one — the new class gets all the attributes and methods for free, and you only add what makes it different. In this lesson you meet the class Sub(Super) syntax, method overriding, the super() function and when to prefer composition over inheritance.