[issue46729] Better str() for BaseExceptionGroup

2022-02-22 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46729] Better str() for BaseExceptionGroup

2022-02-22 Thread Irit Katriel
Irit Katriel added the comment: New changeset 38b5acf8673ce42a401263a2528202e44d6ae60a by Irit Katriel in branch 'main': bpo-46729: add number of sub-exceptions in str() of BaseExceptionGroup (GH-31294) https://github.com/python/cpython/commit/38b5acf8673ce42a401263a2528202e44d6ae60a

[issue46729] Better str() for BaseExceptionGroup

2022-02-12 Thread Guido van Rossum
Guido van Rossum added the comment: Should it show the number of immediate subexceptions (i.e., len(eg.exceptions)) or the number of leaf exceptions? I'd be happy with the former (since that's what EdgeDb's MultiError does), which would not require adding an extra field to the base

[issue46729] Better str() for BaseExceptionGroup

2022-02-12 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +29453 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31294 ___ Python tracker ___

[issue46729] Better str() for BaseExceptionGroup

2022-02-12 Thread Irit Katriel
New submission from Irit Katriel : 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