Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-15 Thread Ronald Oussoren
On 9 Jul, 2013, at 1:21, Steve Dower wrote: > > Except that if it's on a metaclass, the 'instance' it has access to is cls. > The descriptor side of things is more interesting, but I see no reason why > super can't do that itself, since it knows the actual instance to call > __get__ with. (P

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-09 Thread Ronald Oussoren
On 9 Jul, 2013, at 1:21, Steve Dower wrote: >> > > Except that if it's on a metaclass, the 'instance' it has access to is cls. > The descriptor side of things is more interesting, but I see no reason why > super can't do that itself, since it knows the actual instance to call > __get__ with.

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-08 Thread Steve Dower
> From: Ronald Oussoren [mailto:ronaldousso...@mac.com] > Sent: Monday, July 8, 2013 0858 > > On 8 Jul, 2013, at 17:19, Steve Dower wrote: > > > The only real advantage is a simpler signature and more easily explained > use (assuming the person you're explaining it to is familiar with metaclasses

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-08 Thread Ronald Oussoren
On 8 Jul, 2013, at 17:19, Steve Dower wrote: > The only real advantage is a simpler signature and more easily explained use > (assuming the person you're explaining it to is familiar with metaclasses, so > most of the hard explaining has been done). The signature is as complex as it is to be

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-08 Thread Steve Dower
y proposal in the peps repository, but as this is my first PEP I'd prefer to follow the documented procedure and have someone that knows what he's doing look at the metadata before checking in. > > Sent from my Windows Phone > From: Ronald Oussoren > Sent: ‎7/‎6/‎2013 0:

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-07 Thread Ronald Oussoren
efer to follow the documented procedure and have someone that knows what he's doing look at the metadata before checking in. > > Sent from my Windows Phone > From: Ronald Oussoren > Sent: ‎7/‎6/‎2013 0:47 > To: Ronald Oussoren > Cc: python-dev@python.org Dev > Subject: Re: [Python-

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-07 Thread Steve Dower
n.org Dev<mailto:python-dev@python.org> Subject: Re: [Python-Dev] Hooking into super() attribute resolution I've updated the implementation in issue 18181 <http://bugs.python.org/issue18181> while adding some tests, and have updated the proposal as well. The proposal has some open i

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-06 Thread Ronald Oussoren
I've updated the implementation in issue 18181 while adding some tests, and have updated the proposal as well. The proposal has some open issues at the moment, most important of which is the actual signature for the new special method; in particular I haven'

Re: [Python-Dev] Hooking into super() attribute resolution

2013-07-02 Thread Guido van Rossum
No time to read the PEP in detail but the motivation sound reasonable. --Guido van Rossum (sent from Android phone) On Jul 2, 2013 4:53 AM, "Ronald Oussoren" wrote: > Hi, > > Below is a very preliminary draft PEP for adding a special method that can > be used to hook into the attribute resolutio

[Python-Dev] Hooking into super() attribute resolution

2013-07-02 Thread Ronald Oussoren
Hi, Below is a very preliminary draft PEP for adding a special method that can be used to hook into the attribute resolution process of the super object. The primary usecase for using this special method are classes that perform custom logic in their __getattribute__ method, where the default b