Python — From Basics to Advanced · Objects, Errors, Files
Classes and Objects
Objects, Errors, Files
Introduction
A class is a blueprint for an object — you describe once which fields and behaviours a thing should have, then create as many instances as you like. In this lesson you meet the class keyword, the magic __init__ method, the self parameter and the difference between a class attribute and an instance attribute.