On Tue, 16 Jun 2026 at 22:45, Rob Cliffe via Python-list
<[email protected]> wrote:
> You know what "arbitrary" means, but let's take it as
>      "decided for no good reason".
> I have read the PEP and it simply states
>      "NAME is an identifier"
> and later
>      "Single assignment targets other than a single |NAME| are not
> supported"
> Nowhere as far as I can see does it offer any justification for this
> decision.
> Nor does it say that this is a restriction for the initial implementation
> which might be removed subsequently - which would be sensible
> (much the same happened with f-strings).
> Unnecessary restrictions reduce the uniformity of the language (one of
> Python's strengths).

Okay. Try rewriting the grammar to allow any assignment target. See
what you find.

> People will try something that they expect to work, find it's not
> allowed, and ask "Why can't I do that?".
> Can you give one or more examples of syntactic ambiguities that might arise
> (and preferably can't be fixed by adding parentheses) ?
> Any such would be a powerful argument that might change my opinion.

I highly doubt it. You've made up your mind and you're not going to
listen to examples. If you really wanted to learn the reason, you
would have tried pencilling out an alternative, and quickly found the
issues.

ChrisA
-- 
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to