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

Mark Shannon mark at hotpy.org
Tue Sep 10 00:36:15 CEST 2013


On 09/09/13 22:25, Benjamin Peterson wrote:

2013/9/9 Mark Shannon <mark at hotpy.org>:

On 09/09/13 15:30, Ethan Furman wrote:

On 07/30/2013 11:17 PM, Ronald Oussoren wrote:

And something I forgot to ask: is anyone willing to be the BDFL-Delegate for PEP 447? Bump. It would be nice if this could make into 3.4. IMO, there are some issues that need to be addressed before PEP 447 should be accepted. 1. Is there even a problem at all, or is this just a bug in super? Why doesn't super() respect the getattribute method of the superclass? You want to be looking things up on the class, not an instance. Sorry, I meant 'type of the superclass' rather than 'superclass'.

I was suggesting that super().m should be type(type(self).mro[1]).getattribute('m') rather than type(self).mro[1].dict['m'] (ignoring descriptor get calls)

Unfortunately this brings its own problems, due to getattribute doing its own traversal of the mro. So, scratch point 1.

Cheers, Mark.



More information about the Python-Dev mailing list