[Python-Dev] Scoping (corner cases)
Samuele Pedroni
pedroni@inf.ethz.ch
Sun, 18 Mar 2001 01:27:48 +0100
Hi.
Tim Peters wrote:
> [Guido]
>
>> Class scopes don't work like function scopes -- they use
>> LOAD_NAME and STORE_NAME.
>
>
> [Jeremy]
>
>> Class scopes are also different because a block's free variables are
>> not resolved in enclosing class scopes. We'll need to make sure the
>> doc says that class scopes and function scopes are different.
>
>
> Yup. Since I'll never want to do stuff like this, I don't really care a heck
> of a lot what it does; but it should be documented!
>
> What does Jython do with these?
The jython codebase (prior and post to my nested scopes changes) does
exactly the same as python, in fact something
equivalent to LOAD_NAME and SET_NAME is used in class scopes.
regards