0 votes
in Python by
What are descriptors in Python?

1 Answer

0 votes
by

Descriptors were introduced to Python way back in version 2.2. They provide the developer with the ability to add managed attributes to objects. The methods needed to create a descriptor are __get____set__ and __delete__. If you define any of these methods, then you have created a descriptor.

Descriptors power a lot of the magic of Python’s internals. They are what make properties, methods and even the super function work. 

Related questions

0 votes
asked Jun 28, 2020 in Python by Robindeniel
0 votes
asked Jul 2, 2020 in Python by GeorgeBell
...