Re: Understanding descriptors

2009-02-05 Thread Brian Allen Vanderburg II
bruno.42.desthuilli...@websiteburo.invalid wrote: So the lookup chain is: 1/ lookup the class and bases for a binding descriptor 2/ then lookup the instance's __dict__ 3/ then lookup the class and bases for a non-binding descriptor or plain attribute 4/ then class __getattr__ Also and FWIW,

Re: Understanding descriptors

2009-02-05 Thread Bruno Desthuilliers
Brian Allen Vanderburg II a écrit : I'm trying to better understand descriptors and I've got a few questions still after reading some sites. Here is what I 'think', but please let me know if any of this is wrong as I'm sure it probably is. First when accessing an attribute on a class or inst

Re: Understanding descriptors

2009-02-04 Thread Aahz
In article , Brian Allen Vanderburg II wrote: > > [...] > >When a lookup is done it uses this descriptor to make a bound or unbound >method: > >c=C() > >C.F # unbound method object, expects explicit instance when calling the >function >c.F # bound method object provides instance implicitly whe

Understanding descriptors

2009-01-29 Thread Brian Allen Vanderburg II
I'm trying to better understand descriptors and I've got a few questions still after reading some sites. Here is what I 'think', but please let me know if any of this is wrong as I'm sure it probably is. First when accessing an attribute on a class or instance it must be found. For an insta