Using class/static methods as default parameter values within methods of the same class
I'd like to do something like this: class SillyWalk(object): @staticmethod def is_silly_enough(walk): return (False, "It's never silly enough") def walk(self, appraisal_method=is_silly_enough): self.do_stuff() (was_good_enough, reason) = appraisal_method(self) if not was_good_enough: self.execute_self_modifying_code(reason) return appraisal_method def do_stuff(self): pass def execute_self_modifying_code(self, problem): from __future__ import deepjuju deepjuju.kiss_booboo_better(self, problem) with the idea being that someone can do >>> silly_walk = SillyWalk() >>> appraise = walk() >>> is_good