(continued from previous page self length is used in below linesbut length is not initialized by __init__initialization is done by setter at lines due to @property at line also value is displayed by getter (@propetyat line - whereas `widthis get and set as simple python code and without validation def __init__(selflengthwidth)#if self _length is usedthen it will not validate through setter self length length self width width @property def area(self)'''calculates arealength*width''return self length self width def perimeter(self)'''calculates perimeter *(length+width)''return (self length self width @property def length(self)'''displaying length''print("getting length value through getter"return self _length @length setter def length(selfvalue)'''setting length''print("saving value through setter"valueif not isinstance(valueint)validating length as integer raise typeerror("only integers are allowed"self _length value rectangle( , following output will be displayed #saving value through setter print( lengthfollowing output will be displayed #getting length value through getter # #@property is used for area#therefore it can be accessed directly to display the area print( areafollowing output will be displayed #getting length value through getter # # =rectangle( following error will be generated ##typeerroronly integers are allowed print perimeter of rectangle print(rectangle perimeter( )#getting length value through getter # descriptors descriptor are the classes which implement three core attributes access operation getset and del using '__get__''__set__and '__del__as shown in listing in this sectionvalidation is applied using descriptor to remove the problem with @property generalized attribute validation