Need help with Python scoping rules

Xavier Ho contact at xavierho.com
Tue Aug 25 12:58:58 EDT 2009


On Wed, Aug 26, 2009 at 2:14 AM, Diez B. Roggisch <deets at nospam.web.de>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?

Cheers,
-Xav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090826/e0cf6f79/attachment.html>


More information about the Python-list mailing list