the resulting circle object behaves as followsc circle( radius area perimeter area traceback (most recent call last)file ""line in attributeerrorcan' set attribute in this examplecircle instances have an instance variable radius that is stored area and perimeter are simply computed from that value the @property decorator makes it possible for the method that follows to be accessed as simple attributewithout the extra (that you would normally have to add to call the method to the user of the objectthere is no obvious indication that an attribute is being computed other than the fact that an error message is generated if an attempt is made to redefine the attribute (as shown in the attributeerror exception aboveusing properties in this way is related to something known as the uniform access principle essentiallyif you're defining classit is always good idea to make the programming interface to it as uniform as possible without propertiescertain attributes of an object would be accessed as simple attribute such as radius whereas other attributes would be accessed as methods such as area(keeping track of when to add the extra (adds unnecessary confusion property can fix this python programmers don' often realize that methods themselves are implicitly handled as kind of property consider this classclass foo(object)def _init_ (self,name)self name name def spam(self, )print("% % (self namexwhen user creates an instance such as foo("guido"and then accesses spamthe original function object spam is not returned insteadyou get something known as bound methodwhich is an object that represents the method call that will execute when the (operator is invoked on it bound method is like partially evaluated function where the self parameter has already been filled inbut the additional arguments still need to be supplied by you when you call it using (the creation of this bound method object is silently handled through property function that executes behind the scenes when you define static and class methods using @staticmethod and @classmethodyou are actually specifying the use of different property function that will handle the access to those methods in different way for example@staticmethod simply returns the method function back "as iswithout any special wrapping or processing properties can also intercept operations to set and delete an attribute this is done by attaching additional setter and deleter methods to property here is an examplef lib fl ff