Let me echo Irit's response here -- what's your use case for subclassing ExceptionGroup?
Requiring that subclasses have a compatible __init__ or __new__ sounds like a bug magnet, since this can't be checked when the subclass is being defined, and it goes against conventional rules for those signatures.
On Wed, Feb 24, 2021 at 6:22 AM Jim J. Jewett firstname.lastname@example.org wrote:
The "no subclasses" seems pretty severe, particularly if you can't even use marker attributes because it isn't clear when a different instance of container ExceptionGroup will be substituted.
The justification for this restriction was that .split() had to be be able to instantiate ... wouldn't it be enough to just say that subclasses need a compatible __init__ and __new__ for that reason, and then leave it to consenting adults?
-jJ _______________________________________________ Python-Dev mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://email@example.com/message/5OLFDKJC... Code of Conduct: http://python.org/psf/codeofconduct/