Personally, +1 for new attributes, -1 for more syntax, +0 for making it bad style to pre-create exceptions. One object should have all you need.
On 3/2/07, Michael Foord <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > [snip..] > > The one thing that makes me not want to give up yet is that having the > > traceback, context, cause etc. as attributes of the exception object > > would seem to make the API for handling exceptions that much cleaner, > > compared to having to call sys.exc_info() or even "except E as v with > > tb". > > > > So, despite the existence of libraries that pre-create exceptions, how > > bad would it really be if we declared that use unsafe? It wouldn't be > > hard to add some kind of boobytrap that goes off when pre-created > > exceptions are raised multiple times. If this had always been the > > semantics I'm sure nobody would have complained and I doubt that it > > would have been a common pitfall either (since if it doesn't work, > > there's no bad code abusing it, and so there are no bad examples that > > newbies could unwittingly emulate). > > > > > Personally, I think the new attributes and the new syntax are *great* > improvements to exception handling. I would be sad to see parts of these > proposals not happen. > > Michael Foord > _______________________________________________ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com