On Fri, Jan 29, 2010 at 12:39 AM, <exar...@twistedmatrix.com> wrote: > There are at least three ways you can have a single callback and > errback: > > d.addCallback(cb) > d.addErrback(eb) > > or > > d.addErrback(eb) > d.addCallback(cb)
Just to expand on exarkun's answer a little, it might help to understand that addCallback and addErrback are simply implemented in terms of addCallbacks. Roughly: def passthru(arg): return arg d.addCallback(cb) is equivalent to d.addCallbacks(cb, passthru) d.addErrback(eb) is equivalent to d.addCallbacks(passthru, eb) -- mithrandi, i Ainil en-Balandor, a faer Ambar _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python