This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mjpieters
Recipients mjpieters
Date 2016-02-27.09:15:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456564541.09.0.218031979167.issue26449@psf.upfronthosting.co.za>
In-reply-to
Content
From the 9.2. Python Scopes and Namespace section:

> If a name is declared global, then all references and assignments go directly to the middle scope containing the module’s global names. To rebind variables found outside of the innermost scope, the nonlocal statement can be used; if not declared nonlocal, those variable are read-only (an attempt to write to such a variable will simply create a new local variable in the innermost scope, leaving the identically named outer variable unchanged).

This terminology is extremely confusing to newcomers; see https://stackoverflow.com/questions/35667757/read-only-namespace-in-python for an example. Variables are never read-only. The parent scope name simply is *not visible*, which is an entirely different concept. Can this section be re-written to not use the term 'read-only'?
History
Date User Action Args
2016-02-27 09:15:41mjpieterssetrecipients: + mjpieters
2016-02-27 09:15:41mjpieterssetmessageid: <1456564541.09.0.218031979167.issue26449@psf.upfronthosting.co.za>
2016-02-27 09:15:41mjpieterslinkissue26449 messages
2016-02-27 09:15:40mjpieterscreate