このようなコードを取得しました。
....
class SocketWatcher(Thread):
....
def run(self):
....
TicketCounter.increment() # I try to get this function
...
....
class TicketCounter(Thread):
....
def increment(self):
...
プログラムを実行すると、このエラーが発生しました。
TypeError: unbound method increment() must be called with TicketCounter instance as first argument (got nothing instead)
TicketCounter クラスから SocketWatcher クラスへの increment() 関数を呼び出す方法はありますか? または私の呼び出しは間違っていますか...