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 raises) once. Deferreds are no different. If you want a callback that can be invoked multiple times... well, just pass a function to the thing generating callbacks. For instance, Protocol objects have a dataReceived method that may be called many times. -Andrew. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python