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-January/151644.html below:

[Python-Dev] Whatever happened to 'nonlocal x = y'?

[Python-Dev] Whatever happened to 'nonlocal x = y'? [Python-Dev] Whatever happened to 'nonlocal x = y'?Random832 random832 at fastmail.com
Sat Jan 6 15:59:41 EST 2018
On Fri, Jan 5, 2018, at 14:07, Guido van Rossum wrote:
> Yeah, but I've changed my mind on this -- I think it's needless added
> complexity that helps save one line of code in very few use cases. And you
> don't really think the PEP endorses `nonlocal foo += 1` do you?

The PEP itself is very clear about supporting "augmented assignment", even defining the grammar differently for this case (such that you can't do it with multiple names in a single statement). The grammar shown also supports "nonlocal foo = bar = baz", though the text doesn't mention this form.
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