August 2018
Intermediate to advanced
332 pages
9h 12m
English
This method is called when we try to assign something to a descriptor. It is activated with statements such as the following, in which a descriptor is an object that implements __set__ (). The instance parameter, in this case, would be client, and the value would be the "value" string:
client.descriptor = "value"
If client.descriptor doesn't implement __set__(), then "value" will override the descriptor entirely.
By default, the most common use of this method is just to store data in an object. Nevertheless, we have seen how powerful descriptors ...