[issue46431] Trouble subclassing ExceptionGroup

Petr Viktorin report at bugs.python.org
Wed Jan 19 08:49:16 EST 2022


Petr Viktorin <encukou at gmail.com> added the comment:

Thanks for looking into it!

> If you don't define derive the superclass constructor is used, which means you get something of type ExceptionGroup, not your subclass.

That might be fine in my case (for a MVP at least). Is there any other danger in not overriding it?
I see the docs say "A subclass needs to override it", but it might be better to enumerate the perils, or if such a class is unusable, not allow creating it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46431>
_______________________________________


More information about the Python-bugs-list mailing list