instanceinstead of itself cruciallyunlike data stored in the descriptor itselfthis allows for data that can vary per client class instance the descriptor in the following example assumes the instance has an attribute _x attached by the client classand uses it to compute the value of the attribute it representsclass inststatedef __get__(selfinstanceowner)print('inststate get'return instance _x def __set__(selfinstancevalue)print('inststate set'instance _x value client class class calcattrsx inststate( def __init__(self)self _x self obj calcattrs(print(obj xobj yobj zobj calcattrs obj print(obj xobj yobj zobj calcattrs(print(obj xobj yobj zusing instance state(objectin assume set by client class descriptor class attr class attr instance attr instance attr is computedothers are not assignment is intercepted reassigned in class assigned in instance but differs nowlike zherex is assigned to descriptor as before that manages accesses the new descriptor herethoughhas no information itselfbut it uses an attribute assumed to exist in the instance--that attribute is named _xto avoid collisions with the name of the descriptor itself when this version is run the results are similarbut the value of the descriptor attribute can vary per client instance due to the differing state policyc:\codepy - desc-state-inst py inststate get inststate set inststate get inststate get both descriptor and instance state have roles in factthis is general advantage that descriptors have over properties--because they have state of their ownthey can easily retain data internallywithout adding it to the namespace of the client instance object as summarythe following uses both state sources--its self data retains per-attribute informationwhile its instance data can vary per client instance managed attributes