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 holdenweb
Recipients docs@python, ezio.melotti, georg.brandl, holdenweb, mjpieters, rhettinger
Date 2016-02-29.09:40:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456738860.72.0.147030073792.issue26449@psf.upfronthosting.co.za>
In-reply-to
Content
I don't agree there is any place for the term "read-only" in this document. A reader who doesn't understand it or seeks clarification is likely to end up at a page like https://en.wikipedia.org/wiki/Read-only. I submit that nowhere except the documentation under discussion are they likely to find any suggestion that a read-only variable can in fact be changed, and hence I regard the discussion as extremely misleading.

Surely it would be better to focus on the fundamental point here, which is that IN THE ABSENCE OF A global OR nonlocal DECLARATION, ASSIGNMENT BINDS IN THE LOCAL NAMESPACE in a function.

If this point is correctly emphasised it should then be relatively easy to explain that in the absence of such an assignment in the function body in question, the standard name resolution algorithm operates, and that the global and non-local declarations change the effect of assignments to operate on the namespace that is identified by the standard name resolution algorithm.

It's too easy to confuse newcomers, and there seems to be general agreement that this piece is confusing. I'll be happy to attempt a rewrite of this section if we can agree on the goals.
History
Date User Action Args
2016-02-29 09:41:00holdenwebsetrecipients: + holdenweb, georg.brandl, rhettinger, mjpieters, ezio.melotti, docs@python
2016-02-29 09:41:00holdenwebsetmessageid: <1456738860.72.0.147030073792.issue26449@psf.upfronthosting.co.za>
2016-02-29 09:41:00holdenweblinkissue26449 messages
2016-02-29 09:40:59holdenwebcreate