[Python-Dev] PEP 447: add type.locallookup (original) (raw)

Ronald Oussoren ronaldoussoren at mac.com
Thu Sep 19 11:49:10 CEST 2013


On 14 Sep, 2013, at 8:30, Nick Coghlan <ncoghlan at gmail.com> wrote:

but the primary purpose is to customise the retrieval of objects that will be checked to see if they're descriptors. If that's the case, the PEP should make that clear. Technically, that's what "Currently object.getattribute and super.getattribute peek in the dict of classes on the MRO for a class when looking for an attribute." means. However, I agree the current wording only conveys that to the handful of people that already know exactly when in the attribute lookup sequence that step occurs, which is a rather niche audience :)

I've been fooling around with this long enough that I forgot that not everyone knows this :-).

I guess I'd better include a clearer and more complete description of the current attribute resolution protocol and how my proposal affects that. A nice readable Python implementation of that protocol would be nice to have regardless of the fate of this PEP.

Ronald



More information about the Python-Dev mailing list