[Python-3000] Exceptions internals and removing sys.exc_*

Brett Cannon brett at python.org
Sun Jan 21 19:59:45 CET 2007


On 1/20/07, Collin Winter <collinw at gmail.com> wrote:
> Guido has mentioned [1] that since exceptions will be growing a
> __traceback__ attribute in Python 3, it should be possible to remove
> sys.exc_info(). In addition, PEP 3100 mentions the removal of
> sys.exc_{type,value,traceback}. With that in mind, is there a reason
> to keep the exc_{type,value,traceback} fields on PyThreadState
> structs? Is there a reason why these couldn't be consolidated into a
> single PyThreadState->exception field in Python 3?
>

I don't see why this can't be done.  All three should be available
directly off the exception.  We should provide accessor methods,
though, for that information when given an exception.

-Brett


More information about the Python-3000 mailing list