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 iritkatriel
Recipients iritkatriel
Date 2022-02-12.11:02:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644663721.5.0.89729285647.issue46729@roundup.psfhosted.org>
In-reply-to
Content
The str() of exception groups currently contains just the msg as passed to the constructor. This turned out to be confusing (see https://github.com/python/cpython/pull/31270#issuecomment-1036418346).

We should consider whether it is possible to design a more informative str().

Note that the str() is included in the standard traceback, which include the line:

f"{type(e)}: {str(e)}"

So str() should not repeat the type, and should not clutter this too much. Probably just the msg plus the number of contained leaf exceptions.

PEP 654 needs to be updated with what we do here, and the change needs to be approved by the SC.
History
Date User Action Args
2022-02-12 11:02:01iritkatrielsetrecipients: + iritkatriel
2022-02-12 11:02:01iritkatrielsetmessageid: <1644663721.5.0.89729285647.issue46729@roundup.psfhosted.org>
2022-02-12 11:02:01iritkatriellinkissue46729 messages
2022-02-12 11:02:01iritkatrielcreate