Hello, I have some callback function params problems.
Here is a simple example.
def deferDoSomeInsert(paramA, paramB):
insertSQL = "..."
db.runQuery(insertSQL)
def deferDoSomeDelete(paramA, paramB):
deleteSQL = "..."
db.runQuery(deleteSQL)
#these two functions are individual and basic, and then, I need compound
function which first insert then delete.
#so
def deferCompoundFunc(paramA, paramB):
return deferDoSomeInsert.addCallback(deferDoSomeDelete, paramA, paramB)
here the problem comes, the first defer will return none as default so there're
3 pramas pass to the second function.
Is there a common way to solve the problem like this. I mean I can still keep
the separate functions as the look like now,
and I can compound the basic function to do more complex action using
addCallback to link them.
2009-06-09
hoooooosety
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python