
24 Feb
2021
24 Feb
'21
9:20 p.m.
Ideally, (at least) trivial subclasses could be declared, and the class itself would serve as the marker. I would prefer regular subclasses, so that they could offer methods as well. Alternatively, at least copy the instance __dict__ to the new ExceptionGroup instance.
By compatible __init__ and __new__, I mean "whatever you do in ExceptionGroup.subgroup to create a new instance with fewer contained Exceptions ... do the same with MyExceptionGroup." I'm assuming that "whatever" is to call __new__ and __init__ with "a message string and a sequence of the nested exceptions, for example: ExceptionGroup('issues', [ValueError('bad value'), TypeError('bad type')])."
-jJ