[Tutor] question: how do you pass a function as argument for application?
WIGETMAN Robert
robert.wigetman@eurocontrol.be
Wed, 20 Sep 2000 08:54:23 +0100
Hello,
I am new to python and trying to do something like this:
def toto(x):
print 'toto', x
def applyAFunction(f, arg):
??? f(arg)
Also, I am trying to do this in the object framwork:
class C:
def method(sefl, arg):
print self, arg
def methodApply(self, meth, arg):
???? self.meth(arg)
This doesn't weem to work and I can't find anything in the documentation on
the solution?
Can anyone help?
Thanks,
Rob.