Python · Lesson 12.5 · Pro

Properties and class methods

Computed attributes with @property, shared class data, and alternative constructors.

In this lesson

  1. @property: an attribute that's computed
  2. Class attributes: shared by all
  3. @classmethod: another way to create objects
  4. @staticmethod: a helper that lives in the class