Jean-Michel Pichavant wrote: > Diez B. Roggisch wrote >> Classes are not scopes. >> >> > Too bad, could have been handy.
Nope. Because then a lot of people would write something like this: class Foo(object): def bar(self): bar() # note the missing self. And this would lead to errors because self was missing from the call to "bar". And you'd need a disambiguation for methodname/global-name-clashes. The global-statement would work, but then code could break when all of a sudden a subclass defines a method that hitherto was only known as global. So via subclassing, you introduce *arbitray* and hard to debug errors. No. I'm certain, not a good idea. Diez -- http://mail.python.org/mailman/listinfo/python-list