A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-April/152816.html below:

[Python-Dev] PEP 572: Assignment Expressions

[Python-Dev] PEP 572: Assignment ExpressionsChris Angelico rosuav at gmail.com
Fri Apr 20 17:04:01 EDT 2018
On Sat, Apr 21, 2018 at 6:59 AM, Guido van Rossum <guido at python.org> wrote:
> Does the PEP currently propose to *allow* that horrible example? I thought
> Tim Peters successfully pleaded to *only* allow a single "NAME := <expr>".
> You don't have to implement this restriction -- we know it's possible to
> implement, and if specifying this alone were to pull enough people from -1
> to +0 there's a lot of hope!

I don't see much value in restricting the assignment target to names
only, but if that's what it takes, it can be restricted, at least
initially. As to chaining... well, since the entire construct (target
:= expr) is an expression, it can be used on the right of :=, so short
of outright forbidding it, there's not a lot to be done.

ChrisA
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4