classes and object-oriented programming in this examplenotice how the class twotimes is passed to mul(as an object although this example is esotericthere are practicalbut subtleuses of class methods as an examplesuppose that you defined class that inherited from the date class shown previously and customized it slightlyclass eurodate(date)modify string conversion to use european dates def _str_ (self)return "% /% /% (self dayself monthself yearbecause the class inherits from dateit has all of the same features howeverthe now(and tomorrow(methods are slightly broken for exampleif someone calls eurodate now() date object is returned instead of eurodate object class method can fix thisclass date(object)@classmethod def now(cls) time localtime(create an object of the appropriate type return cls( tm_yeart tm_montht tm_dayclass eurodate(date) date now( eurodate now(calls date now(dateand returns date calls date now(eurodateand returns eurodate one caution about static and class methods is that python does not manage these methods in separate namespace than the instance methods as resultthey can be invoked on an instance for examplea date( , , now(calls date now(datethis is potentially quite confusing because call to now(doesn' really have anything to do with the instance this behavior is one area where the python object system differs from that found in other oo languages such as smalltalk and ruby in those languagesclass methods are strictly separate from instance methods properties normallywhen you access an attribute of an instance or classthe associated value that is stored is returned property is special kind of attribute that computes its value when accessed here is simple exampleclass circle(object)def _init_ (self,radius)self radius radius some additional properties of circles @property def area(self)return math pi*self radius** @property def perimeter(self)return *math pi*self radius lib fl ff