Ezio Melotti added the comment: 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.
---------- nosy: +r.david.murray _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23589> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com