[Python-3000] exception info [was: Discussions with no PEPs]

Guido van Rossum guido at python.org
Mon Mar 12 23:03:02 CET 2007


On 3/12/07, Georg Brandl <g.brandl at gmx.net> wrote:
> Has the final decision now been made whether the traceback should be
> stuck on the exception or not?

If it has, I wasn't there. :-(

I'm still hoping we can get agreement that storing the traceback on
the exception object is the way to go. Only a handful of modules using
pre-baked exception objects would have to be fixed, and likely those
were doing it out of a misunderstanding of the performance
characteristics.

Then sys.exc_info() would be a roundabout way to ask for the tuple
(e.__class__, e, e.__traceback__) and would constrain implementations
to keep the most recently caught exception around per stack frame to
maintain sys.exc_info()'s precise semantics.

I'd much rather add something to 2.6 that stores __traceback__ on the
exception instance when it is caught using 'as' syntax (but not using
',' syntax).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list