The problem that I have is that errback flow is awkward... the main difference is that addCallbacks will call the errback if its own callback fails, right? I can only see that really being useful by accident.<br><br><div class="gmail_quote">

On Wed, Mar 30, 2011 at 11:09 AM, Christopher Armstrong <span dir="ltr">&lt;<a href="mailto:radix@twistedmatrix.com">radix@twistedmatrix.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="gmail_quote"><div class="im">On Wed, Mar 30, 2011 at 2:55 AM, Tristan Seligmann <span dir="ltr">&lt;<a href="mailto:mithrandi@mithrandi.net" target="_blank">mithrandi@mithrandi.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>On Tue, Mar 29, 2011 at 5:08 PM, Christopher Armstrong<br>
&lt;<a href="mailto:radix@twistedmatrix.com" target="_blank">radix@twistedmatrix.com</a>&gt; wrote:<br>
&gt; I probably  once for every 30-&#39;s 100 addCallback or addErrback<br>
&gt; calls I do (counted by lines of code, not times they&#39;re executed). But<br>
&gt; that&#39;s just an off-the-cuff estimate.<br>
<br>
</div>For interest&#39;s sake, I just ran the numbers on my largest codebase (a<br>
proprietary application, sorry); ratio of addCallbacks to (addCallback<br>
+ addErrback) is around 0.05.<br>
<font color="#888888"></font></blockquote><div><br></div></div><div>Funny, that&#39;s what I got on my proprietary application (0.0597) :-) It&#39;s a heavily inlineCallbacks-based codebase, and I expect there would be a much larger number of addCallback/addErrback calls if it weren&#39;t. Also, looking at the actual uses of addCallbacks (15), they were all written by people other than me (relative Twisted newbies) and I don&#39;t think I would have used it where it&#39;s used now. This, I think, indicates that we *should* focus more on addCallback and addErrback in the documentation, and stress that they are almost always what you want to use instead of addCallbacks, but definitely point out where addCallbacks is useful.</div>


<div><br></div><div>-- </div></div><div><div></div><div class="h5">Christopher Armstrong<br><a href="http://radix.twistedmatrix.com/" target="_blank">http://radix.twistedmatrix.com/</a><br><a href="http://planet-if.com/" target="_blank">http://planet-if.com/</a><br>

<br><br>
</div></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>