<div class="gmail_quote">On Tue, Mar 29, 2011 at 7:56 AM, Peter Hogg <span dir="ltr">&lt;<a href="mailto:dev@vokoda.com">dev@vokoda.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I haven&#39;t been following the thread, but just wanted to mention<br>
something that caught me out when I was learning to use deferreds.<br>
<br>
Both the old deferred documentation and your fix-up fail to mention<br>
addCallbacks() until near the end, when in practice I find<br>
addCallbacks() to be much more useful than addCallback(). The diagram<br>
near the top demonstrating the deferred process also implies the use of<br>
addCallbacks(), even though prior to this only addCallback() and<br>
addErrback() have been mentioned. This confused me into thinking a<br>
consecutive addCallback().addErrback() would register a callback and an<br>
errback at the same point in the processing chain.<br>
<br></blockquote><div><br></div><div><br></div><div>I probably use addCallbacks once for every 30-100 addCallback or addErrback calls I do (counted by lines of code, not times they&#39;re executed). But that&#39;s just an off-the-cuff estimate.</div>
<div><br></div></div>-- <br>Christopher Armstrong<br><a href="http://radix.twistedmatrix.com/">http://radix.twistedmatrix.com/</a><br><a href="http://planet-if.com/">http://planet-if.com/</a><br><br><br>