What I want to do is: Pass foo function pointer to function bar as a default parameter. But it is not allowed. How to implement it?
class Klass ():
def __init__(self):
print('init')
def foo(self):
print('foo')
def bar(self, func=self.foo): # error here
func()
print('bar')