I think that nice syntax contributes towards adoption. Subclassing deferred and adding a __get__ function that queues calls for future Deferreds is at least worth a shot. Perhaps adding a safety net with allowed function names would help. This list could be per "project" - storm orm integration would have its StormDeferred and something else - its own.
2010/5/7, exar...@twistedmatrix.com <exar...@twistedmatrix.com>: > On 03:37 pm, drwxrwxr.x+twistedm...@gmail.com wrote: >>>(yield resultset[10:20]).sort(Sort.ASC) >>> >>>assuming a new enough version of Python. >> >>I wonder if it a good idea to subclass Deferred and define __call__() >>for it, making it attach callbacks to itself. >>Theoretically should work in earlier versions and make the syntax look >>more transparent. > > Let me clear that up for you, then. > > No, this is not a good idea. :) > > Jean-Paul > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > -- Nosūtīts no manas mobilās ierīces -- Konrads Smelkovs Applied IT sorcery. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python