After reading through the PEP and skimming the code (but I didn't build it), something I didn't see: What happens to a currently conforming except check?
try:
    async with trio.open_nursery() as nursery:
        # Make two concurrent calls to child()
        nursery.start_soon(child)
        nursery.start_soon(child)
except ValueError:
    pass
I've removed the * from the example: Say the interface was built for 3.7, but the "trio" module has been upgraded to use ExceptionGroups which can't fall back to a standalone exception.

Silently hand back the first exception, or the first matching exception? Deprecation warning? Silently skip? Context-specific error? Run the default error handler?

I think that deserves a statement in the PEP.

-Em


On Mon, Feb 22, 2021 at 4:48 PM Irit Katriel via Python-Dev <python-dev@python.org> wrote:

Hi all,

We would like to request feedback on PEP 654 -- Exception Groups and except*.


It proposes language extensions that allow programs to raise and handle multiple unrelated
exceptions simultaneously, motivated by the needs of asyncio and other concurrency libraries,
but with other use cases as well.

* A new standard exception type,  ExceptionGroup, to represent multiple exceptions with
  shared traceback.
* Updates to the traceback printing code to display (possibly nested) ExceptionGroups.
* A new syntax except* for handling ExceptionGroups.

A reference implementation (unreviewed) can be found at:

Thank you for your help

Kind regards
Irit, Yury & Guido