[Twisted-Python] why deferred.setTimeout is not my favorite API method
exarkun at divmod.com
exarkun at divmod.com
Sun Apr 18 00:21:11 EDT 2004
On Sun, 18 Apr 2004 10:25:34 +1000, Andrew Bennetts <andrew-twisted at puzzling.org> wrote:
>
> [snip]
>
> I don't see why allowing users of Deferreds to just say
> "d.setTimeout(5)" is a bad thing?
>
> [snip]
I tend to prefer "foo(x, y, timeout=z)" over "foo(x, y).setTimeout(z)". As both require explicit support from the implementor of "foo" (as you correctly note is the only way .setTimeout() can actually work), it seems unnecessary to special-case this form of failure in Deferreds. I cast my vote for the former.
Jp
More information about the Twisted-Python
mailing list