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

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-04 Thread Aahz
In article mailman.8322.1233272628.3487.python-l...@python.org, Brian Allen Vanderburg II brianvanderbu...@aim.com 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