class righttriangle(object)"class used solely as namespace for related functions@staticmethod def hypotenuse(ab)return math sqrt( ** ** @staticmethod def sin(ab)return righttriangle hypotenuse(ab@staticmethod def cos(ab)return righttriangle hypotenuse(abkeeping this functionality in class avoids polluting the global (or moduleetc namespaceand lets us name either the class or an instance of it when we make calls to pure functions for examplerighttriangle hypotenuse( , rt righttriangle(rt sin( , rt cos( , by far the most straightforward way to define static methods is with the decorator named in the obvious way howeverin python xyou can pull out functions that have not been so decorated too-- the concept of an "unbound methodis no longer needed in modern python versionsimport functoolsoperator class math(object)def product(*nums)return functools reduce(operator mulnumsdef power_chain(*nums)return functools reduce(operator pownumsmath product( , , math power_chain( , , without @staticmethodhoweverthis will not work on the instances since they still expect to be passed selfm math( product( , , methods of classes