A Twisted Design Decision

Jean-Paul Calderone exarkun at divmod.com
Wed Jan 28 15:10:33 CET 2009

On Wed, 28 Jan 2009 02:02:57 -0800 (PST), koranthala <koranthala at gmail.com> wrote:
>On Jan 27, 9:27 pm, koranthala <koranth... at gmail.com> wrote:
>> On Jan 27, 6:57 pm, Jean-Paul Calderone <exar... at divmod.com> wrote:
> [snip]
>> Thank you Jean-Paul.
>> My code is more complex than what I have mentioned. When I mentioned
>> msg.send, the msg object actually gets the data from DB etc to send.
>> And there are many other items being done.
>> I will try to see whether I can change the code to incorporate what
>> you mentioned.
>> I rewrote most of my code after learning just raw deferreds - I had
>> planned to study inlineCallbacks - but then it slipped my mind  - now
>> it has come to bit me. :-(
>  I tried to update the code as per the suggestion, but to no avail.
>  My system uses Python2.4.3 (cannot move to 2.5) - so I tried to
>rewrite with deferredGenerators - since I thought inlineCallbacks are
>similar to deferredGenerators.
>  But I cannot seem to rewrite it in a format where the functional
>encapsulation is not broken.
>  i.e. as I mentioned in the first example - I have to pass SELF to
>child objects for them to modify it.

Why?  You don't do this in the original version of your code.  Why do
it after switching to Twisted (particularly since you seem to want *not*


More information about the Python-list mailing list