The$_{property()}$ builtin helps whenever a user interface has granted attribute access and then subsequent changes require the intervention of a method. For instance, a spreadsheet class may grant access to a cell value through$_{Cell('b10').value}$ . Subsequent improvements to the program require the cell to be recalculated on every access; however, the programmer does not want to affect existing client code accessing the attribute directly. The solution is to wrap access to the value attribute in a property data descriptor: classCell : ... @property def value(self): "Recalculate the cell before returning value " self.recalc() return self._value Either the built-in property() or our Property() equivalent would work in this example. Python’s object oriented features are built upon a function based environment. Using non-data descriptors, the two are merged seamlessly. Functions stored in class dictionaries get turned into methods when invoked. Methods only differ from regular func- tions in that the object instance is prepended to the other arguments. By convention, the instance is called self but could be called this or any other variable name. Methods can be created manually with$_{types.MethodType}$which is roughly equivalent to: 4.2 Functions and methods classMethodType : "Emulate PyMethod_Type in Objects/classobject.c " def __init__ (self, func, obj): self.__func__ =func self.__self__ =obj def __call__ (self,*args,**kwargs): func=self.__func__ obj =self.__self__ return func(obj, *args,**kwargs) classFunction : ... def __get__ (self, obj, objtype = None ): "Simulate func_descr_get() in Objects/funcobject.c " if obj is None : return self return MethodType(self, obj) To support automatic creation of methods, functions include the$_{__get__()}$ method for binding methods during attribute access. This means that functions are non-data descriptors that return bound methods during dotted lookup from an instance. Here’s how it works: Running the following class in the interpreter shows how the function descriptor works in practice: classD : def f(self, x): return x The function has a qualified name attribute to support introspection: 14