calling a function in python got nothing instead
I got a code like this.
....
class SocketWatcher(Thread):
....
def run(self):
....
TicketCounter.increment() # I try to get this function
...
....
class TicketCounter(Thread):
....
def increment(self):
...
when I run the program I got this error.
TypeError: unbound method increment() must be called with TicketCounter
instance as first argument (got nothing instead)
i there any way that I can call the increment() function from
TicketCounter Class to the SocketWatcher Class? or Does my calling is
wrong...
No comments:
Post a Comment