<div><div dir="auto">Also nobody had a use case.</div></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 13, 2018 at 6:57 AM Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jul 13, 2018 at 11:36 PM, Random832 <<a href="mailto:random832@fastmail.com" target="_blank">random832@fastmail.com</a>> wrote:<br>
> On Wed, Jul 11, 2018, at 20:10, Guido van Rossum wrote:<br>
>> As anticippated, after a final round of feedback I am hereby accepting PEP<br>
>> 572, Assignment Expressions: <a href="https://www.python.org/dev/peps/pep-0572/" rel="noreferrer" target="_blank">https://www.python.org/dev/peps/pep-0572/</a><br>
><br>
> I know everyone else is probably sick of discussing this (I somehow completely missed the discussion until it was almost done) but I have a question...<br>
><br>
> Why does this not allow assignment to attributes and subscripts? I think this is, at least, surprising enough that there should be a rationale section explaining it in the PEP. As it is, it's barely even explicitly stated, other than the use of 'NAME' in a few places and an offhand mention "and [the assignment statement] can assign to attributes and subscripts."<br>
><br>
<br>
It was discussed at some length, yes. Assignment to arbitrary targets<br>
would also mean permitting iterable unpacking, which is not desired<br>
("x, y := 3, 4"??), and there weren't enough use-cases for<br>
attribute/item assignment to justify creating a rule of "you can<br>
assign to any single target, but can't unpack". In the future, if such<br>
use-cases are found, the grammar can be expanded.<br>
<br>
ChrisA<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">--Guido (mobile)</div>