[New-bugs-announce] [issue41478] Empty representation of AssertionError

Ilya Kamenshchikov report at bugs.python.org
Tue Aug 4 12:47:24 EDT 2020

New submission from Ilya Kamenshchikov <ikamenshchikov at gmail.com>:

I have a high level wrapper where I am catching expection and present  it  in (more) user-friendly format with a message. 

    raise ValueError
except Exception as e:
    print(f"Following happened: {e}")

>>> prints "Following happened: "

Can an exception print it's class when it has no message?

components: Interpreter Core
messages: 374831
nosy: Ilya Kamenshchikov
priority: normal
severity: normal
status: open
title: Empty representation of AssertionError
type: behavior
versions: Python 3.8

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list