[issue41478] Empty representation of AssertionError

2020-12-16 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41478] Empty representation of AssertionError

2020-08-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since you should print the exception class anyway, I think that using repr should be sufficient and that this issue should be closed. In any case, the current behavior does not seem like a bug. -- ___ Python

[issue41478] Empty representation of AssertionError

2020-08-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ilya, in the future, when responding by email, please delete the message you are responding to. It is already present on the web page. -- nosy: +terry.reedy ___ Python tracker

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: Changing behavior and it's impact on existing code is, without a doubt, a big deal here. Maybe it's a reason not to do anything about it. Just to understand guiding design principle, what is expected from __str__ in more general case? I thought about it as

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > That's a solution, except you must know ahead of time this issue exists. If we changed str(e) to make it the same as repr(e), there would be no way to get only the message. str(e) returns the message so if the message given was empty (or no message was

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: That's a solution, except you must know ahead of time this issue exists. Best Regards, -- Ilya Kamen On Tue, Aug 4, 2020 at 6:59 PM Rémi Lapeyre wrote: > > Rémi Lapeyre added the comment: > > Hi, can you not use its repr: > > > >>> try: raise

[issue41478] Empty representation of AssertionError

2020-08-04 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, can you not use its repr: >>> try: raise ValueError ... except Exception as e: print(f"Following happened: {e!r}") ... Following happened: ValueError() ? -- nosy: +remi.lapeyre ___ Python tracker

[issue41478] Empty representation of AssertionError

2020-08-04 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : I have a high level wrapper where I am catching expection and present it in (more) user-friendly format with a message. try: raise ValueError except Exception as e: print(f"Following happened: {e}") >>> prints "Following happened: " Can