Another +1 for `except group` from me.
On 04/10/2021 2:57 pm, Ammar Askar wrote:
Throwing in another +1 for `except group`.
It's explicit, doesn't introduce new punctuation and avoids confusion
with unpacking.
Regards,
Ammar
On Mon, Oct 4, 2021, 3:31 AM Antoine Pitrou <anto...@python.org
<mailto:anto...@python.org>> wrote:
On Sun, 3 Oct 2021 19:42:29 +0200
Łukasz Langa <luk...@langa.pl <mailto:luk...@langa.pl>> wrote:
>
> -1
>
> If I could read the vertical line as a pipe character, the
expression would read "except or E as e".
> But I can't read it that way anyway. Instead, all I see is a
lowercase EXCEPTL.
>
> 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`.
+1. This is much more helpful to the reader than the cryptic
asterisk.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
<mailto:python-dev@python.org>
To unsubscribe send an email to python-dev-le...@python.org
<mailto:python-dev-le...@python.org>
https://mail.python.org/mailman3/lists/python-dev.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/INK6TSOGGODA4NZ3CI5MOXIAI4Z4CZ53/
<https://mail.python.org/archives/list/python-dev@python.org/message/INK6TSOGGODA4NZ3CI5MOXIAI4Z4CZ53/>
Code of Conduct: http://python.org/psf/codeofconduct/
<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/4ZUBUDQ4CGXYJAIYKMJMJBGUGGTODECF/
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/OFSIDJNKCXPXRJJNFDUG3JKNLPJUQGLD/
Code of Conduct: http://python.org/psf/codeofconduct/