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 georg.brandl
Recipients georg.brandl, orsenthil, siona, terry.reedy
Date 2009-09-19.10:35:07
SpamBayes Score 2.4322846e-06
Marked as misclassified No
Message-id <1253356510.16.0.813376788076.issue6925@psf.upfronthosting.co.za>
In-reply-to
Content
> I disagree with calling only nonlocal variables but not module variables
> 'free'. As I quoted from Wikipedia, that restrictive definition is not
> agree on by all at all.

But it is the definition that Python uses, at least in the code.  I
agree that the usage of "free variable" in the reference manual is
inconsistent; this should be fixed independently.

> Python does not treat top-level or recursive function names specially in
> the way meant above.

It does treat them differently: they are globals, not free variables.

> I used 'nonlocal' specifically because the behavior of locals() seemed
> by my testing to be concordant with the behavior of the 'nonlocal'
> statement, which rejects the globals that locals does not print.  What
> do you mean by 'clash'?

"nonlocal" variables could be mistaken as variables that are declared as
nonlocal by such a statement.
History
Date User Action Args
2009-09-19 10:35:10georg.brandlsetrecipients: + georg.brandl, terry.reedy, orsenthil, siona
2009-09-19 10:35:10georg.brandlsetmessageid: <1253356510.16.0.813376788076.issue6925@psf.upfronthosting.co.za>
2009-09-19 10:35:08georg.brandllinkissue6925 messages
2009-09-19 10:35:07georg.brandlcreate