Message92866
> 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. |
|
Date |
User |
Action |
Args |
2009-09-19 10:35:10 | georg.brandl | set | recipients:
+ georg.brandl, terry.reedy, orsenthil, siona |
2009-09-19 10:35:10 | georg.brandl | set | messageid: <1253356510.16.0.813376788076.issue6925@psf.upfronthosting.co.za> |
2009-09-19 10:35:08 | georg.brandl | link | issue6925 messages |
2009-09-19 10:35:07 | georg.brandl | create | |
|