Op 16/06/2026 om 14:48 schreef Chris Angelico via Python-list:
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.
Sure, you replace the rule: name ':=' expression with: target ':=' expression So why shouldn't that work? -- https://mail.python.org/mailman3//lists/python-list.python.org
