Part of twisted.internet.defer View Source
Deferred
that
has already had .callback(result)
called.
This is useful when you're writing synchronous code to an asynchronous
interface: i.e., some code is calling you expecting a Deferred
result, but you don't actually need to do anything asynchronous. Just
return defer.succeed(theResult)
.
See fail
for
a version of this function that uses a failing Deferred
rather than a successful one.
Parameters | result | The result to give to the Deferred's 'callback' method. |
Returns | (type: Deferred ) |