[Twisted-Python] Deferred style question.
Bob Ippolito
bob at redivi.com
Fri Jan 7 05:24:18 EST 2005
On Jan 7, 2005, at 5:13, Anthony Baxter wrote:
> class DeferredCache:
...
> if not self.cache.has_key(args):
>
> @DeferredCache
> def longRunningOperation(value):
...
> # Alternatively, if you don't like decorators or are on < Python 2.4
> #longRunningOperation = DeferredCache(longRunningOperation)
It's funny that you are using a decorator, but not the __contains__
operator ;)
-bob
More information about the Twisted-Python
mailing list