[issue30384] traceback.TracebackException.format shouldn't format_exc_only() when __traceback__ is None

Irit Katriel report at bugs.python.org
Wed Nov 4 11:16:10 EST 2020


Irit Katriel <iritkatriel at yahoo.com> added the comment:

Setting __traceback__ to None is not going to make the exception disappear.  Note that TracebackException does not represent a traceback, it represent an exception (for rendering in tracebacks). So all information of the exception is rendered by TracebackException.format(), not only the exception's traceback.

It's not entirely clear to me what you are trying to do (what is the output you are hoping to get?) but this looks more like a question than a bug report, so I am closing this issue. If this is still relevant, I'd suggest you ask on the python users list or StackOverflow - you are more likely to receive a prompt response there.

----------
nosy: +iritkatriel
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30384>
_______________________________________


More information about the Python-bugs-list mailing list