[issue17911] traceback: add a new thin class storing a traceback without storing local variables

Nick Coghlan report at bugs.python.org
Fri Feb 6 14:31:41 CET 2015


Nick Coghlan added the comment:

dir() will get me TracebackException as a name, help(traceback.TracebackException) will get me its signature. IDEs with autocomplete and signature tooltips will do the same.

There is nothing in those usage sequences to say "don't use __init__, use this redundant class method with the same signature instead".

I agree providing a "directly from an exception" constructor is essential for cases where you're working with a caught exception at the Python level. I don't agree with the idea of duplicating the required low level API under a different name so it doesn't *look* like a lower level API in the documentation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17911>
_______________________________________


More information about the Python-bugs-list mailing list