[Twisted-Python] deferredGenerator or inlineCallbacks
Justin Warren
daedalus at eigenmagic.com
Mon Jan 14 22:14:37 EST 2008
On Tue, 2008-01-15 at 04:03 +0100, Nitro wrote:
> > Note that you cannot
> >
> > return result
> >
> > from within do_some_inline_callback_stuff(), because this is actually a
> > generator now, since it contains a yield.
>
> You can. Use the returnValue() function found in the same module as the
> inlineCallbacks decorator.
Oh woo! I just tried that out and, well, *awesome*. Soooo much neater.
I have so much code to clean up...
--
Justin Warren <daedalus at eigenmagic.com>
More information about the Twisted-Python
mailing list