Python · Lesson 12.5 · Pro
Properties and class methods
Computed attributes with @property, shared class data, and alternative constructors.
In this lesson
- @property: an attribute that's computed
- Class attributes: shared by all
- @classmethod: another way to create objects
- @staticmethod: a helper that lives in the class
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.