© Jacob Zimmerman 2018
Jacob ZimmermanPython Descriptorshttps://doi.org/10.1007/978-1-4842-3727-4_10

10. Descriptors Are Classes Too

Jacob Zimmerman1 
(1)
New York, USA
 

It’s time for some more advanced stuff with descriptors. Actually, it’s not really advanced, since it’s stuff that pertains to all classes. There won’t be a very in-depth look at much in this chapter; it’s just a reminder that features normally available to classes are available to descriptors as well.

Inheritance

Descriptors can inherit and be inherited from other classes (which will generally be other descriptors or descriptor utilities/helpers). Using inheritance, descriptors can be built using pre-built mixins and template classes that already implement the base functionality wanted ...

Get Python Descriptors: Understanding and Using the Descriptor Protocol now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.