[Python-ideas] PEP 572: Assignment Expressions (post #4)
Guido van Rossum
guido at python.org
Fri Apr 13 11:13:20 EDT 2018
Regarding the precedence of :=, at this point the only acceptable outcome
for me is one where at the statement level, := and = can be used
interchangeably and will have the same meaning (except probably we wouldn't
allow combining both in a chained assignment). Because then we can say "and
you can use assignment in expressions too, except there you must use :=
because = would be too easily confused with ==".
Ideally this would allow all forms of = to be replaced with :=, even
extended structure unpacking (a, b, *c := foo()).
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180413/adee5004/attachment.html>
More information about the Python-ideas
mailing list