[Python-Dev] PEP 447: add type.locallookup (original) (raw)
Steve Dower Steve.Dower at microsoft.com
Fri Sep 13 05:04:49 CEST 2013
- Previous message: [Python-Dev] PEP 447: add type.__locallookup__
- Next message: [Python-Dev] PEP 447: add type.__locallookup__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What about getlocalattribute or getattributenorecurse? Long, but this isn't going to be used often.
Putting "type" or "class" in the name would be misleading. It's an instance method (that is most useful when implemented on a metaclass).
(Apologies for the top post.)
Sent from my Windows Phone
From: Steven D'Aprano<mailto:steve at pearwood.info> Sent: 9/12/2013 16:09 To: python-dev at python.org<mailto:python-dev at python.org> Subject: Re: [Python-Dev] PEP 447: add type.locallookup
On Thu, Sep 12, 2013 at 04:42:39PM +0200, Ronald Oussoren wrote:
I don't particularly like locallookup either, but haven't found a better name yet. "lookupinclass" was the best alternative I could come up with, and that feels different than other special methods. The name in the PEP is more or less derived from PyTypeLookup, with "local" meaning "only in this class, don't recurse in the rest of the MRO".
How about typelookup ? Surely that's the obvious name to derive from _PyType_Lookup :-)
-- Steven
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40microsoft.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130913/a7be4a71/attachment.html>
- Previous message: [Python-Dev] PEP 447: add type.__locallookup__
- Next message: [Python-Dev] PEP 447: add type.__locallookup__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]