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/2010-December/107029.html below:

[Python-Dev] nonlocal x = value

[Python-Dev] nonlocal x = value [Python-Dev] nonlocal x = valueGeorg Brandl g.brandl at gmx.net
Mon Dec 27 15:01:16 CET 2010
Am 27.12.2010 10:43, schrieb Raymond Hettinger:

> FWIW, I'm entirely opposed to doing an assignment in a nonlocal definition.
> 
> * It is easily mis-parsed by human (as shown by Georg's examples).
> * It looks very much like an initialization of a local variable in many languages,
>   but it is not -- the variable has already been initialized in another scope.

Hah, and we'd probably get requests for a mandatory declaration of locals, ala

local a = 5

for reasons of "consistency" or "explicit is better than implicit".

Georg


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