| Store | Cart

Re: [Python-Dev] PEP 447 (type.__getdescriptor__)

From: Ronald Oussoren <rona...@mac.com>
Wed, 22 Jul 2015 19:24:27 +0200
> On 22 Jul 2015, at 19:12, Steve Dower <Stev...@microsoft.com> wrote:> > 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__.

Not a null check, but a check for a specific function pointer. That way you can be sure that super classes always have the slot which IMHO gives a nicer user experience.

> >> 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.

The PEP on the website contains performance test data, but that’s out of data. I don’t think the implementation of attribute lookup has changed enough to really invalidate those test results, but I will rerun the tests once I’ve updated the patch because hunches don’t count when evaluating performance.

Ronald

> > Cheers,> Steve> >> -->> Terry Jan Reedy> > _______________________________________________> Python-Dev mailing list> Pyth...@python.org <mailto:Pyth...@python.org>> https://mail.python.org/mailman/listinfo/python-dev <https://mail.python.org/mailman/listinfo/python-dev>> Unsubscribe: https://mail.python.org/mailman/options/python-dev/ronaldoussoren%40mac.com <https://mail.python.org/mailman/options/python-dev/ronaldoussoren%40mac.com>

_______________________________________________
Python-Dev mailing list
Pyth...@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.com

Recent Messages in this Thread
Ronald Oussoren Jul 22, 2015 07:25 am
Terry Reedy Jul 22, 2015 04:02 pm
Steve Dower Jul 22, 2015 05:12 pm
Ronald Oussoren Jul 22, 2015 05:24 pm
Nick Coghlan Jul 24, 2015 02:17 pm
Ronald Oussoren Jul 24, 2015 02:43 pm
Brett Cannon Jul 24, 2015 02:50 pm
Nick Coghlan Jul 24, 2015 03:29 pm
Ronald Oussoren Jul 24, 2015 05:55 pm
Ronald Oussoren Jul 25, 2015 11:26 am
Ronald Oussoren Jul 22, 2015 05:21 pm
Joao S. O. Bueno Jul 23, 2015 01:52 pm
Dima Tisnek Jul 23, 2015 09:29 am
Ronald Oussoren Jul 23, 2015 10:05 am
Mark Shannon Jul 25, 2015 03:39 pm
Ronald Oussoren Jul 26, 2015 07:14 am
Ronald Oussoren Jul 26, 2015 09:41 am
Mark Shannon Jul 26, 2015 12:18 pm
Ronald Oussoren Aug 05, 2015 07:52 am
Steve Dower Jul 23, 2015 12:43 pm
Messages in this thread