Message413121
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. |
|
Date |
User |
Action |
Args |
2022-02-12 11:02:01 | iritkatriel | set | recipients:
+ iritkatriel |
2022-02-12 11:02:01 | iritkatriel | set | messageid: <1644663721.5.0.89729285647.issue46729@roundup.psfhosted.org> |
2022-02-12 11:02:01 | iritkatriel | link | issue46729 messages |
2022-02-12 11:02:01 | iritkatriel | create | |
|