On Aug 10, 5:27 pm, Eric Snow wrote:
> On Wed, Aug 10, 2011 at 8:33 AM, Fuzzyman wrote:
> > On Aug 5, 12:29 pm, Ryan wrote:
> >> In the context of descriptors, the __set__ method is not called for
> >> class attribute access. __set__ is only
> >> called to set the attribute on an instance instan
On Wed, Aug 10, 2011 at 8:33 AM, Fuzzyman wrote:
> On Aug 5, 12:29 pm, Ryan wrote:
>> In the context of descriptors, the __set__ method is not called for
>> class attribute access. __set__ is only
>> called to set the attribute on an instance instance of the owner class
>> to a new value, value.
Fuzzyman wrote:
>> The descriptor protocol only works when a value is being accessed or set
>> on an instance and there is no instance attribute of that name so the
>> value is fetched from the underlying class.
>>
>
> That's not true. Properties, for example, can be got or set even when
> they
On Aug 5, 1:16 pm, Duncan Booth wrote:
> Ryan wrote:
> > In the context of descriptors, the __set__ method is not called for
> > class attribute access. __set__ is only
> > called to set the attribute on an instance instance of the owner class
> > to a new value, value. WHY? Is there some other m
On Aug 5, 12:29 pm, Ryan wrote:
> In the context of descriptors, the __set__ method is not called for
> class attribute access. __set__ is only
> called to set the attribute on an instance instance of the owner class
> to a new value, value. WHY?
It's an unfortunate asymmetry in the descriptor pr
Peter Otten <__pete...@web.de> wrote:
> Duncan Booth wrote:
>
>> The descriptor protocol only works when a value is being accessed or set
>> on an instance and there is no instance attribute of that name so the
>> value is fetched from the underlying class.
>
> Unlike normal class attributes a d
Duncan Booth wrote:
> The descriptor protocol only works when a value is being accessed or set
> on an instance and there is no instance attribute of that name so the
> value is fetched from the underlying class.
Unlike normal class attributes a descriptor is not shaded by an instance
attribute:
Ryan wrote:
> In the context of descriptors, the __set__ method is not called for
> class attribute access. __set__ is only
> called to set the attribute on an instance instance of the owner class
> to a new value, value. WHY? Is there some other mechanism for
> accomplishing this outcome. This s
Ryan wrote:
> In the context of descriptors, the __set__ method is not called for
> class attribute access. __set__ is only
> called to set the attribute on an instance instance of the owner class
> to a new value, value. WHY? Is there some other mechanism for
> accomplishing this outcome. This su