square py def nested_property(func)""nest gettersetter and deleter""names func(names['doc'func __doc__ return property(**namesclass square(object)"" square using property with decorator""def __init__(selfside)self side side @nested_property def area()"""calculate the area of the square""def fget(self)""calculate area ""return self side * def fset(selfvalue)""do not allow set area directly""print("can not set area"def fdel(self)"""do not allow deleting""print("can not delete area"return locals( square( print( area area can not set area del area can not delete area note@propery is good for performing certain operations before getset and delete operation butwe need to implement it for all the functions separately and code becomes repetitive for larger number of methods in such casesdescriptors can be useful data descriptors data_descriptor py class datadescriptor(object)""descriptor example ""def __init__(self)self value def __get__(selfinstancecls)print("data descriptor __get__"return self value def __set__(selfinstancevalue)(continues on next page descriptors