in Python by
Q:
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. 

Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Jun 30, 2020 in Python by GeorgeBell
0 votes
asked Jul 2, 2020 in Python by GeorgeBell
0 votes
0 votes
asked Jun 26, 2020 in Python by AdilsonLima
0 votes
asked Jun 30, 2020 in Python by GeorgeBell
0 votes
asked May 17, 2019 in Python by Derya
...