Passing a method indirectly
jimlewis at miclog.com
Sun Mar 5 00:53:27 CET 2006
I'm trying to write a function that takes an arbitrary object and
The function applies the method to the object (and some other stuff).
I get error "Test instance has no attribute 'method' "
How can I make this work?
def ObjApply (object,method):
def test1 (self): print "Hello"
def test2 (self):
ta = Test ()
More information about the Python-list