This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients iritkatriel, petr.viktorin
Date 2022-01-19.13:38:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642599529.45.0.0346516917202.issue46431@roundup.psfhosted.org>
In-reply-to
Content
We probably do need better documentation for subclassing ExceptionGroup.

When you subclass an ExceptionGroup you want to make sure that split() and subgroup() (which are used by except*) will continue working, usually by defining a derive() method:

https://docs.python.org/3.11/library/exceptions.html#BaseExceptionGroup.derive

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


I don't know whether it's a good idea to make it easier to define a subclass that doesn't support split()/except* because ti changes the constructor signature without providing derive().
History
Date User Action Args
2022-01-19 13:38:49iritkatrielsetrecipients: + iritkatriel, petr.viktorin
2022-01-19 13:38:49iritkatrielsetmessageid: <1642599529.45.0.0346516917202.issue46431@roundup.psfhosted.org>
2022-01-19 13:38:49iritkatriellinkissue46431 messages
2022-01-19 13:38:49iritkatrielcreate