Nathan Huesken wrote:
Hi,

I have a class, where I want to store a callback function as a member
to access later:

class CallbackClass:
    def setCallback(self,cb):
        self.cb = cb

    def callCallback(self, para):
        self.cb(para)

Doing so, I get the error:
callbackFunc() takes exactly 1 parameter (2 given)

self is given as parameter this way, is it not? How can this be done?

Could you provide a short program which we could run to reproduce the
problem?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to