What is a descriptor?
Properties, descriptors, and slots
Audio flashcard · 0:16Nortren·
What is a descriptor?
0:16
A descriptor is an object that defines dunder get, dunder set, or dunder delete and is stored as a class attribute. When accessed through an instance, Python calls the descriptor's methods instead of returning the attribute directly. Properties, methods, and class methods are all implemented using descriptors.
docs.python.org