You don't need to pass the object along with the method. The method is 
bound to the object. Simply call the method by itself:

def ObjApply(method):
        method()

class Test:
        def test1 (self): print "Hello"
        def test2 (self):
                ObjApply(self.test1)

ta = Test ()
ta.test2 ()

If you wanted to pass an unbound method, then it would look like the 
following:

def ObjApply(object,method):
        method(object)

class Test:
        def test1 (self): print "Hello"
        def test2 (self):
                ObjApply(self,Test.test1)

ta = Test ()
ta.test2 ()
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to