Here's a syntax that solves this using the new operators _:= and ,_

a = [1,2,3]
(    _:=    a    ,_    .append(4)    ,_    .sort()    )


Personally, I find this a bit harder to read on one line and would break it
up like this:

(_:=    a
,_      .append(4)
,_ .    .sort()
)


--- Bruce
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to