いくつかのスレッドを実行したいメソッドがあるpythonクラスがあります
class OutageTool:
def main(self):
outages = [{
'var1' : 1,
'var2' : 2,
},
{
'var1' : 3,
'var2' : 4,
}]
for outage in outages:
t = threading.Thread(target=self.outage_thread, args=(outage))
t.start()
def outage_thread(self, outage):
"""
some code here
"""
このコードを実行すると、エラーが発生します
TypeError: outage_thread() takes exactly 2 arguments (3 given)
私はpythonが初めてで、ここで何が起こっているのかについてのアイデアを本当に感謝しています。
C