On 12/11/2010 6:46 AM, Lie Ryan wrote: > On 12/11/10 11:37, Dan Stromberg wrote: >> On Fri, Dec 10, 2010 at 3:51 PM, John Nagle <na...@animats.com> wrote: >>> On 12/10/2010 3:25 PM, Stefan Behnel wrote: >>>> Benjamin Kaplan, 11.12.2010 00:13: >>>>> On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote: >>>>> The only scopes Python has are module and function. >>> >>> There's more. Both a lambda, and in Python 3.x, >>> list comprehensions, introduce a new scope. >> >> And classes and methods. > > Also, class scope and instance scope, though similar, are distinct > scopes. Python also have the hidden interpreter-level scope (the > __builtins__).
But classes and instances don't have scopes. They have namespaces. That is, if we are talking about lexical scoping. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list