On Tue, Mar 29, 2011 at 7:56 AM, Peter Hogg <d...@vokoda.com> wrote: > I haven't been following the thread, but just wanted to mention > something that caught me out when I was learning to use deferreds. > > Both the old deferred documentation and your fix-up fail to mention > addCallbacks() until near the end, when in practice I find > addCallbacks() to be much more useful than addCallback(). The diagram > near the top demonstrating the deferred process also implies the use of > addCallbacks(), even though prior to this only addCallback() and > addErrback() have been mentioned. This confused me into thinking a > consecutive addCallback().addErrback() would register a callback and an > errback at the same point in the processing chain. > >
I probably use addCallbacks once for every 30-100 addCallback or addErrback calls I do (counted by lines of code, not times they're executed). But that's just an off-the-cuff estimate. -- Christopher Armstrong http://radix.twistedmatrix.com/ http://planet-if.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python