How to pass extra arguments to callback register functions with twisted python api?
问题 I have the following python code using the twisted API. def function(self,filename): def results(result): //do something for i in range(int(numbers)) : name = something that has to do with the value of i df = function_which_returns_a defer(name) df.addCallback(results) It uses the Twisted API. What i want to achieve is to pass to the callbacked function (results) the value of the name which is constructed in every iteration without changing the content of the functions_which_returns_a defer()