We’ll, typically you don’t explicitly mention ExceptionGroup — it’s implied
by the ‘except*’ syntax. Introducing match semantics probably wouldn’t open
up new functionality, you can already write ‘except (E1, E2):’.

On Sun, Oct 3, 2021 at 09:00 Thomas Grainger <tagr...@gmail.com> wrote:

> What about `except case ExceptionGroup[E1 | E2]:`? and use match semantics?
>
> On Sun, 3 Oct 2021, 16:50 Irit Katriel via Python-Dev, <
> python-dev@python.org> wrote:
>
>>
>> We wonder if people have a view on which of the following is
>> clearer/better:
>>
>> 1. except *E as e:  //  except *(E1, E2) as e:
>> 2. except* E as e:  //  except* (E1, E2) as e:
>>
>> (The difference is in the whitespace around the *).
>>
>> At the moment * is a separate token so both are allowed, but we could
>> change that (e.g., make except* a token), and in any case we need to settle
>> on a convention that we use in documentation, etc.
>>
>> It is also not too late to opt for a completely different syntax if a
>> better one is suggested.
>>
>>
>> _______________________________________________
>> Python-Dev mailing list -- python-dev@python.org
>> To unsubscribe send an email to python-dev-le...@python.org
>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>> Message archived at
>> https://mail.python.org/archives/list/python-dev@python.org/message/4B256YKUPW5P2M44GG5H6FBL3PSV6ODP/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/XNZNX2M2PQ24VEH5GWCGVFS5EY6XMRAX/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-- 
--Guido (mobile)
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WJGWKUPTTLZW37R3B5W33FRBSFMK3CUE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to