Op 24/05/2022 om 18:46 schreef Chris Angelico:

(foo["bar"]
       ["baz"]
       ["eggs"]
       ["spam"] = 1)


Not for assignment, unfortunately. And you can't cheat with := either,
since only simple names are permitted.

This would work:

(foo["bar"]
    ["baz"]
    ["eggs"]
    ["spam"]) = 1

Benedict
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/JVAOKKJA3UYVUWAMQUSVO7XHQDZ77FVP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to