Message410943
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(). |
|
Date |
User |
Action |
Args |
2022-01-19 13:38:49 | iritkatriel | set | recipients:
+ iritkatriel, petr.viktorin |
2022-01-19 13:38:49 | iritkatriel | set | messageid: <1642599529.45.0.0346516917202.issue46431@roundup.psfhosted.org> |
2022-01-19 13:38:49 | iritkatriel | link | issue46431 messages |
2022-01-19 13:38:49 | iritkatriel | create | |
|