# Accepting PEP 654 (Exception Groups and except\*)

**URL:** <https://discuss.python.org/t/accepting-pep-654-exception-groups-and-except/10813>\
**Category:** PEPs\
**Created:** [September 24, 2021, 10:05pm UTC](https://discuss.python.org/t/accepting-pep-654-exception-groups-and-except/10813 "2021-09-24T22:05:55Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Zac-HD](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/zac-hd/32/607_2.png) [@Zac-HD](https://discuss.python.org/u/Zac-HD)\
**Post date:** [October 4, 2021, 12:02pm UTC](https://discuss.python.org/t/accepting-pep-654-exception-groups-and-except/10813/9 "2021-10-04T12:02:27Z")

</div>

> [@iritkatriel](#):
>
> How would you use ExceptionGroups in 3.10 without `except*` ?

The part that I really want is an ecosystem-wide “collection of exceptions” type, which enables nice features like good reporting, debugger support, and so on.

Most of that for me is Hypothesis’ [`report_multiple_bugs` setting](https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.report_multiple_bugs): we collect exceptions from each failing input, and want to show the user each distinct error. Currently that means we just [print each (trimmed) traceback](https://github.com/HypothesisWorks/hypothesis/pull/1582) - it works, but misses out on things like Pytests’s configurable colored and expanded tracebacks, debugger suport, and so on.

> [@iritkatriel](#):
>
> Code review and experimenting with the code would be great help.

Review incoming - I found it very surprising that `BaseExceptionGroup("", [Exception()])` returns a non-`Base` exceptiongroup object, but the rest looks good.

From a few hours of experimenting, the only thing I’m missing is a way to annotate each nested exception. In my case that’s something like `Falsifying example: test(x=False)`, but I think the same consideration applies to use motivated by callbacks (which does the exception come from?) or async tasks - the traceback alone is not always sufficient identifying information.

`raise FalsifyingExample("test(x=False)") from err` for each of the nested exceptions provides a workaround, but that does feel like an ugly hack.

---

_[View the full topic](https://discuss.python.org/t/accepting-pep-654-exception-groups-and-except/10813)._
