[Twisted-Python] Deferred documentation.

Christopher Armstrong radix at twistedmatrix.com
Wed Mar 30 11:09:06 EDT 2011

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 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.
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110330/3db49634/attachment.htm 

More information about the Twisted-Python mailing list