On Sun, 3 Oct 2021 at 16:55, 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 *).
I prefer (1). I never liked C declarations where the * was attached to the type rather than the variable, and I have the same dislike here.
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.
Having said the above, it's a matter of taste/preference, so I think that allowing both is the correct thing to do.
It is also not too late to opt for a completely different syntax if a better one is suggested.
Let's stick with "except *". It doesn't seem productive to have another round of bikeshedding at this point, unless there's a really compelling technical reason (i.e., something significantly more than mere bikeshedding). Paul