[Twisted-Python] Making inlineCallback return a generator rather than a Deferred
Nitro
nitro at dr-code.org
Sat Jan 26 15:59:26 EST 2008
Am 26.01.2008, 21:21 Uhr, schrieb Andrew Francis <andrewfr_ice at yahoo.com>:
> Hello Folks:
>
> As I previously mentioned, I have the following called
> from a PyAMF method:
>
> @defer.inlineCallbacks
> def echo(self, x):
> result = yield client.getPage("http://localhost")
>
> because of the yield, I cannot use
>
> return result
@defer.inlineCallbacks
def echo(self, x):
result = yield client.getPage("http://localhost")
defer.returnValue(result)
More information about the Twisted-Python
mailing list