Re: [Twisted-Python] conceptually, why a deferred can't be used more than once?

2010-07-08 Thread Andrew Bennetts
Jean Daniel wrote: > Dear list, > > Concerning the concept of the deferred, why is it more useful to go > with a deferred which gets consumed and can only be fired once? Because they are basically a way to provide asynchronous function calls. In plain Python a function call only returns (or rais

Re: [Twisted-Python] conceptually, why a deferred can't be used more than once?

2010-07-08 Thread Terry Jones
Hi Jean > Concerning the concept of the deferred, why is it more useful to go with > a deferred which gets consumed and can only be fired once? I can't speak for the Twisted devs, but my #1 reason would be that it's just simpler that way (and Deferreds are already complex enough). > In my small

[Twisted-Python] conceptually, why a deferred can't be used more than once?

2010-07-08 Thread Jean Daniel
Dear list, Concerning the concept of the deferred, why is it more useful to go with a deferred which gets consumed and can only be fired once? In my small script I realize I need to take special care that the deferred has not been used, and that I must recreate explicitly a deferred for each netw