use instance state to record data pertaining to descriptor implementation internals--if stored in each instancethere would be multiple varying copies descriptor methods may use either state formbut descriptor state often makes it unnecessary to use special naming conventions to avoid name collisions in the instance for data that is not instance-specific for examplethe following descriptor attaches information to its own instanceso it doesn' clash with that on the client class' instance--but also shares that information between two client instancesclass descstatedef __init__(selfvalue)self value value def __get__(selfinstanceowner)print('descstate get'return self value def __set__(selfinstancevalue)print('descstate set'self value value use descriptor state(objectin on attr fetch on attr assign client class class calcattrsx descstate( def __init__(self)self descriptor class attr class attr obj calcattrs(print(obj xobj yobj zobj calcattrs obj print(obj xobj yobj zx is computedothers are not assignment is intercepted reassigned in class assigned in instance obj calcattrs(print(obj xobj yobj zinstance attr but uses shared datalike ythis code' internal value information lives only in the descriptorso there won' be collision if the same name is used in the client' instance notice that only the descriptor attribute is managed here--get and set accesses to are interceptedbut accesses to and are not ( is attached to the client class and to the instancewhen this code is runx is computed when fetchedbut its value is also the same for all client instances because it uses descriptor-level statec:\codepy - desc-state-desc py descstate get descstate set descstate get descstate get descriptors