On 11 Apr, 10:55 pm, [email protected] wrote:
I can get around this in ways that are less elegant:
@defer.inlineCallbacks
def func():
# do some stuff
d = defer.Deferred()
callSomethingElse(d)
d.callback(result)
newResult = yield d
defer.returnValue(newResult)
When I write functions that take a Deferred I typically have them return
a Deferred as well, to avoid this, and other syntactic nuisances. Would
you consider the following more elegant?
@inlineCallbacks
def func():
# do some stuff
returnValue(yield callSomethingElse(succeed(result)))
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python