Prev | Index | Next

Deferreds of Deferreds

from twisted.internet import defer

def deferredOfTwo():
    d = defer.Deferred()
    d.callback(2)
    return d

d = defer.Deferred()
d.callback(4)

d2 = defer.Deferred()
d.callback(deferredOfTwo())