This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asmeurer
Recipients Aaron.Meurer, asmeurer, iritkatriel
Date 2020-11-04.21:02:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think I found another way to achieve what I was trying to do, which is why I never pursued this. But I still think it's a bug.

__traceback__ = None isn't documented anywhere that I could find, so I was only able to deduce how it should work from reading the source code. If it is documented somewhere let me know.

I admit my initial report is a bit unclear. If you play with the you can see what is going on

    import traceback

        raise ValueError
    except Exception as e:
        e.__traceback__ = None
            raise TypeError

produces this output:


    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "", line 8, in <module>
        raise TypeError

My goal is to completely hide the caught exception in the traceback printed from the traceback module. It seems odd that it hides everything except for the actual ValueError.
Date User Action Args
2020-11-04 21:02:50asmeurersetrecipients: + asmeurer, Aaron.Meurer, iritkatriel
2020-11-04 21:02:50asmeurersetmessageid: <>
2020-11-04 21:02:50asmeurerlinkissue30384 messages
2020-11-04 21:02:50asmeurercreate