On Dec 17, 8:41 am, prueba...@latinmail.com wrote:

> If scoping worked as you want, how, pray tell, would you define object
> attributes?- Hide quoted text -

I suppose you could do this:

class className():
    varname = "whatever"
    def fname(self, varname):
       . . . .

Instead of having variable defined within methods to be global
everywhere within the class.

Anyway, it's not a matter of what I like, I am just trying to
understand the reason behind the scoping rules.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to