----- Original Message ----- From: "Edward Z. Yang" <ezy...@mit.edu> To: "Twisted general discussion" <twisted-python@twistedmatrix.com> Sent: Monday, August 03, 2009 6:00 PM Subject: Re: [Twisted-Python] Deferred documentation rewrite ================ I like the side-by-side regular and twisted versions, that's helpful. You are approaching the complicated stuff toward the end - please don't stop there. Show some more examples of more intricate cases of side-by-side logic, eg how to use deferreds for this if all foo's are asynchronous: x=foo1(y) if x > 0: z=foo2(x) y = foo3(z) else: z=foo4(x,y) alldone=foo5(z) # now add error handling for all the deferreds # how would I debug things if foo3 had an unanticipated error? ================ My latest real question for the docs to answer is, Are these different? == example 1 ==== d=asynchronousprocess() d.addCallback(b) d.addCallback(c) d.addErrback(errbc) === example 2 ==== d=asynchronousprocess().addCallback(b).d.addCallback(c).d.addErrback(errd) ============= Why or why not? When might one use one form over the other? -Dave
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python