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 ezio.melotti
Recipients docs@python, ezio.melotti, fossilet, r.david.murray, rhettinger
Date 2015-03-05.11:48:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425556133.46.0.053040714199.issue23589@psf.upfronthosting.co.za>
In-reply-to
Content
I think the first sentence could be improved, even though it's correct.
A superficial reading might give the impression that function variables are implicitly global, or that only the variables inside a function are global, especially if the reader is not familiar with the term "referenced".
Swapping the two sentences and talking first about assignment might be enough to make clear that the other sentence is talking about variables that are only read/accessed by the function but not defined/assigned.
The paragraph can also be rephrased to say that Python can freely access variables from outer scopes, but that "global" is required to assign a new value to a global variable, and that variables defined inside a function are local.
History
Date User Action Args
2015-03-05 11:48:53ezio.melottisetrecipients: + ezio.melotti, rhettinger, fossilet, r.david.murray, docs@python
2015-03-05 11:48:53ezio.melottisetmessageid: <1425556133.46.0.053040714199.issue23589@psf.upfronthosting.co.za>
2015-03-05 11:48:53ezio.melottilinkissue23589 messages
2015-03-05 11:48:53ezio.melotticreate