"Peter Otten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Gary Stephenson wrote:
>
>> I want to define a class-level attribute that will be shared by all
>> subclasses. That is, I want this class, every subclass of this class,
>> every instance of this class and every instance
Gary Stephenson wrote:
> # but I need to be able to update the value through the class
> # how do I do it?
> A.cls2 = 4 # whoops - we just overwrote the descriptor with an integer
>
> A.cls2.__set__(None,4) # AttributeError: 'int' object has no attribute
> '__set__'
You need to define the
Gary Stephenson wrote:
> I want to define a class-level attribute that will be shared by all
> subclasses. That is, I want this class, every subclass of this class,
> every instance of this class and every instance of every subclass to be
> able to
> read and write to the _same_ slot/variable. B