On Sun, May 9, 2021 at 9:48 AM Thomas Grainger <[email protected]> wrote:

> now that python2.7 is EOL, it might be worth resurrecting this syntax as
> discussed in https://www.python.org/dev/peps/pep-3100/#id13
>
> eg, python 3.11 could support
> ```
> try:
>     ...
> except (E1, E2, E3) as e:
>     ...
> ```
>
> as equivalent to
>
> ```
> try:
>     ...
> except E1, E2, E3 as e:
>     ...
> ```
>

-1

I think you really mean you want Python to accept the form without the
parenthesis. I don't like it because it's easy to read that as

except E1, E2, (E3 as e):

and I don't think saving two characters is worth the disruption caused by
people being able to write Python 3.11 code that won't work in Python 3.10.
Many people would not adopt the new syntax for that reason.

--- Bruce
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/7NSJP4CYS37DLKT7GZTZRO6B4CMILRJJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to