[Twisted-Python] Deferred documentation.
radix at twistedmatrix.com
Tue Mar 29 11:08:14 EDT 2011
On Tue, Mar 29, 2011 at 7:56 AM, Peter Hogg <dev at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python