[Twisted-Python] Deferred documentation.

Jasper St. Pierre jstpierre at mecheye.net
Wed Mar 30 11:50:53 EDT 2011

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.

On Wed, Mar 30, 2011 at 11:09 AM, Christopher Armstrong <
radix at twistedmatrix.com> wrote:

> On Wed, Mar 30, 2011 at 2:55 AM, Tristan Seligmann <
> mithrandi at mithrandi.net> wrote:
>> On Tue, Mar 29, 2011 at 5:08 PM, Christopher Armstrong
>> <radix at twistedmatrix.com> wrote:
>> > I probably once for every 30-'s 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.
>> For interest's sake, I just ran the numbers on my largest codebase (a
>> proprietary application, sorry); ratio of addCallbacks to (addCallback
>> + addErrback) is around 0.05.
> Funny, that's what I got on my proprietary application (0.0597) :-) It's a
> heavily inlineCallbacks-based codebase, and I expect there would be a much
> larger number of addCallback/addErrback calls if it weren'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't think I would have used
> it where it'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.
> --
> Christopher Armstrong
> http://radix.twistedmatrix.com/
> http://planet-if.com/
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110330/3fd38248/attachment-0001.htm 

More information about the Twisted-Python mailing list