> I'm not sure what language you've dealt with before, but if it was Java or
> C++, then you've run into Python's variant of static members.
>
> class X(object):
>    classMember = True
>
>    def __init__(self):
>        self.instanceMember = True
>
>
> Does that make it any clearer? As to the why, I'd ask Guido Van Rossum. ;)

Its a standard feature of the Object Model of programming.
Virtally all OOP systems provide a mechanism for setting class level 
attributes.

Alan G. 

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to