a descriptor is an object attribute with “binding behavior”, one whose attribute access has been overridden by methods in the descriptor protocol.
Descriptors that only define get are called non-data descriptors (they are typically used for methods but other uses are possible).
If an object defines both
__get__
and__set__
, it is considered a data descriptor.
overriding
__getattribute__
prevents automatic descriptor calls
If an instance’s dictionary has an entry with the same name as a data descriptor, the data descriptor takes precedence. If an instance’s dictionary has an entry with the same name as a non-data descriptor, the dictionary entry takes precedence.