[Python-ideas] PEP 572: about the operator precedence of :=

David Mertz mertz at gnosis.cx
Thu May 10 07:04:37 EDT 2018


On Wed, May 9, 2018, 11:53 PM Guido van Rossum <guido at python.org> wrote:

> Oh, I hadn't even though of combining the two in one statement. That
> example is truly horrible (on first skim I didn't even notice it used two
> different assignment operators!) and strengthens my confidence that we
> should just disallow an un-parenthesized `:=` operator at the top level,
> where now the top level includes the RHS of a classic assignment.
>

IMO, I would strongly prefer calling an unparenthesized top-level ':=' a
SyntaxError.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180510/6d3cbc53/attachment.html>


More information about the Python-ideas mailing list