[Twisted-Python] inlineCallbacks: multiple yielding same Defferred behaviour

Sergey V. Gerasimov sergun at gmail.com
Mon Jan 28 02:47:48 EST 2013

It's not intuitively clear why multiple yielding the same Defferred in
function decorated with defer.inlineCallbacks get different results:



def f():

                d = defer.succeed(1)

                result = yield d

print result

                result = yield d

print result






Probably we SHOULD NOT think if "d" was or was not yielded before when using


Are they some workarounds?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20130128/9d6e220d/attachment.htm 

More information about the Twisted-Python mailing list