On Sun, 2008-01-20 at 11:18 +0100, Dirk Meyer wrote:
> A second reason: you always get one parameter for your callback when
> you connect to an InProgress object (the return value or the
> exception). With your proposal it is harder to handle return and
> exception in one function, IMHO it looks stupid to have two extra
> parameter for an exception you don't need:

So your argument is that we should add the stack to the exception object
as some custom member rather than as callback arguments so that we can
get away with using one handler for both result and exception.

I dislike this a lot.  First, how often are we using one handler for
both result and exception?  You can't deny that passing the exception
information as callback arguments is cleaner than modifying the
exception with a custom member, so the best argument is the one you just
made, which is merely a kludge to allow for a single handler.  Secondly,
the example you gave with testing the exception kwarg is hardly that
bad, so my suggestion allows for a single handler anyway.  Thirdly, the
(exc_type, exc_value, traceback) arguments is seen throughout the python
api and we should follow this example.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to