On Fri, Sep 18, 2020 at 3:46 AM Steven D'Aprano <[email protected]> wrote:
> If there is anything that might justify the name "tuple (or list)
> literal" it would be a tuple with each item a literal:
>
> (1, "a", None)
>
> but certainly not one containing expressions or names:
>
> (spam+1, eggs(), aardvark.cheese)
>
That sounds sensible, I hadn't thought about the terminology that
carefully. But in case anyone disagrees, the exact terms are not really the
point. The point is that this:
(a, b) = c
is 'assigning to a literal' just as much as this:
f"{a} {b}" = c
Both are just things that look like expressions with dynamic values but
aren't.
_______________________________________________
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/BJVIRUU4NQ2E57ELZ4N4YMB5CCUQW5YT/
Code of Conduct: http://python.org/psf/codeofconduct/