Need help with Python scoping rules

Xavier Ho contact at
Tue Aug 25 18:58:58 CEST 2009

On Wed, Aug 26, 2009 at 2:14 AM, Diez B. Roggisch <deets at>wrote:

> Classes are not scopes.
> So the above doesn't work because name resolution inside functions/methods
> looks for local variables first, then for the *global* scope. There is no
> class-scope-lookup.

Sorry, I'm coming here with sincere ignorance. If local variables and global
variables are not "scopes", then what would it be?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list