[Twisted-Python] Re: [Twisted-commits] Accumulated Woven Changes::

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Oct 14 15:39:10 EDT 2002

On Tue, 15 Oct 2002 02:31:56 +1000, Andrew Bennetts <andrew-twisted at puzzling.org> wrote:
> This makes me wonder if most of the time you want to add a callback and an
> errback, you want the errback to be able to catch the callbacks errors.

I originally experimented with it that way, and I like it better the way it is.
For example, in the case of a remote method call, you use addCallbacks if you
want to handle the remote call by saying "Here is the result: ..." or "Remote
traceback: ..."  It's really misleading to have the "remote traceback" message
happen in the case where the traceback is really local.  Worse yet is to have a
situation where it's acceptable to swallow any remote error, but a local error
is unexpected.  Since the default behavior should be to print out a traceback
in the log, naive use of addCallbacks will do the right thing.

Of course, there are situations that go both ways, but I've encountered the
former more often than the latter.

I think the current implementation also wins because this change wouldn't be a
significant improvement, and it's better to keep the API more stable. (1.0
looming or not, stability should be the default unless the API in question is
very new, or there is a significant benefit to changing...)

 |    <`'>    |  Glyph Lefkowitz: Travelling Sorcerer  |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021014/d08f2f25/attachment.pgp 

More information about the Twisted-Python mailing list