Passing a function as an argument from within the same class?

bearophileHUGS at bearophileHUGS at
Fri May 1 10:44:43 EDT 2009

Zealalot, probably there are some ways to do that, but a simple one is
the following (not tested):

def function2(self, passed_function=None):
    if passed_function is None:
        passed_function = self.doNothing


More information about the Python-list mailing list