On Oct 3, 2021, at 10:42, Łukasz Langa <luk...@langa.pl> wrote:
> 
> My idea is this:
> 
> try:
>    ...
> except group E as e:
>    ...
> except group E1, T2 as e:
>    ...
> 
> Should be doable given the magical match-case contextual keywords precedent. 
> This looks nice and is explicit, since you will always get an ExceptionGroup 
> instance under `e`. But I know it's a bit late for bikeshedding this thing so 
> if we want to be conservative and stick to the current syntactical options 
> already defined in PEP 654, I'm voting Option 2 (given the awkwardness of the 
> *(E1, E2) example).

Speaking just for myself, the `except *` syntax always bothered me, but I 
couldn’t come up with anything better and it wasn’t enough for me to vote 
against PEP 654.  `except group` is nicer though, and I would be in favor of 
that, or something like it.

We could of course bike shed on the syntax forever.  The PSC did vote to accept 
the PEP but we left room for changes while during the 3.11 cycle.

-Barry

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
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/7KHAN76UA5JRND2M2EMVLKML665KQDTC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to