
Steven Taschuk wrote:
[...] I would also like the traceback to be an attribute of the exception object (circular references be damned!), specified by optional keyword argument to Exception.__init__. This would require that people writing their own exception classes be sure to extend, not override, Exception.__init__.
Wouldn't it make more sense to associate the traceback with the exception instance when the exception is raised, not when the exception is instantiated? As long as the exception isn't raised it's just a normal object without a traceback attached. The warning framework and PEP 293 use unraised exceptions for passing around error information, it would be bad if the would gain traceback info automatically. Bye, Walter Dörwald