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

Tony Lownds tony at PageDNA.com
Sun Jan 21 19:26:36 CET 2007


On Jan 20, 2007, at 9:46 PM, Collin Winter 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().

I hope that doesn't happen. sys.exc_info() is the only way to write code
using exception values that will run on both 2.5 and 3.0.

except Exception:
   e = sys.exc_info()[1]

-Tony




More information about the Python-3000 mailing list