an alternative way to code properties in this case when it' runthe results are the samec:\codepy - prop-person-deco py fetch bob smith change fetch robert smith remove fetch sue jones name property docs compared to manual assignment of property resultsin this case using decorators to code properties requires just three extra lines of code-- seemingly negligible difference as is so often the case with alternative toolsthoughthe choice between the two techniques is largely subjective descriptors descriptors provide an alternative way to intercept attribute accessthey are strongly related to the properties discussed in the prior section reallya property is kind of descriptor--technically speakingthe property built-in is just simplified way to create specific type of descriptor that runs method functions on attribute accesses in factdescriptors are the underlying implementation mechanism for variety of class toolsincluding both properties and slots functionally speakingthe descriptor protocol allows us to route specific attribute' getsetand delete operations to methods of separate class' instance object that we provide this allows us to insert code to be run automatically on attribute fetches and assignmentsintercept attribute deletionsand provide documentation for the attributes if desired descriptors are created as independent classesand they are assigned to class attributes just like method functions like any other class attributethey are inherited by subclasses and instances their access-interception methods are provided with both self for the descriptor instance itselfas well as the instance of the client class whose attribute references the descriptor object because of thisthey can retain and use state information of their ownas well as state information of the subject instance for examplea descriptor may call methods available in the client classas well as descriptorspecific methods it defines like propertya descriptor manages singlespecific attributealthough it can' catch all attribute accesses genericallyit provides control over both fetch and assignment accesses and allows us to change an attribute name freely from simple data to computation without breaking existing code properties really are just convenient way to managed attributes