Descriptors PREMIUM

Trey Hunner smiling in a t-shirt against a yellow wall
Trey Hunner
11 min. read Python 3.8—3.12
Tags

Descriptors are Python objects that can intercept attribute access on another object.

Properties

Python's property decorator is powered by the descriptor protocol.

When we use property like this:

...

A Python Tip Every Week

Need to fill-in gaps in your Python skills? I send weekly emails designed to do just that.