[Python-Dev] PEP 447 (type.__getdescriptor__)
Steve Dower
Steve.Dower at microsoft.com
Wed Jul 22 19:12:44 CEST 2015
Terry Reedy wrote:
> On 7/22/2015 3:25 AM, Ronald Oussoren wrote:
>> Hi,
>>
>> Another summer with another EuroPython, which means its time again to
>> try to revive PEP 447…
>>
>> I’ve just pushes a minor update to the PEP and would like to get some
>> feedback on this, arguably fairly esoteric, PEP.
>
> Yeh, a bit too esoteric for most of us to review. For instance, it is not
> obvious to me, not familiar with internal details, after reading the intro, why
> a custom __getattribute__ is not enough and why __getdescriptor__ would be
> needed. If Guido does not want to review this, you need to find a PEP BDFL for
> this.
>
> There are two fairly obvious non-esoteric questions:
>
> 1. How does this impact speed (updated section needed)?
Agreed, this is important. But hopefully it's just a C indirection (or better yet, a null check) for objects that don't override __getdescriptor__.
> 2. Is this useful, that you can think of, for anything other than connecting to
> Objective C?
There are other object models that would benefit from this, but I don't recall that we came up with uses other than "helps proxy to objects where listing all members eagerly is expensive and/or potentially incorrect". Maybe once you list all the operating systems that are now using dynamic object-oriented APIs rather than flat APIs (Windows, iOS, Android, ... others?) this is good enough?
FWIW, I'm still +1 on this, pending performance testing.
Cheers,
Steve
> --
> Terry Jan Reedy
More information about the Python-Dev
mailing list