(continued from previous pageself side side @property def area(self)"""calculate the area of the square""return self side * name for setter and deleter ( @areamust be same as the method for which @property is used area here @area setter def area(selfvalue)""do not allow set area directly""print("can not set area"@area deleter def area(self)"""do not allow deleting""print("can not delete area" square( print( area area can not set area del area can not delete area note that@area setter and @area deleter are optional here we can stop writing the code after defining the @property in thatcase setter and deleter option will generate standard exception attribute error here if we want to perform some operationsthen setter and deleter options are required furthercode is repetitive because @propertysetter and deleter are the part of same method here area we can merge all three methods inside one method as shown next but before looking at that examplelet' understand two python features first **kwargs and locals(**kwargs **kwargs converts the keyword arguments into dictionary as shown belowdef func(**kwargs)print(kwargsfunc( = = {' ' ' ' locals(locals return the dictionary of local variablesas shown belowdef mathex(ab)add diff print(locals()mathex( {' ' 'add' ' ' 'diff' nowwe can implement all the getset and del method inside one method as shown below descriptors