[Python-Dev] PEP 447: add type.locallookup (original) (raw)
Ronald Oussoren ronaldoussoren at mac.com
Thu Sep 12 16:42:39 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 ]
On 9 Sep, 2013, at 20:23, Jan Kaliszewski <zuo at chopin.edu.pl> wrote:
Is 'locallookup' a really good name? In Python, local -- especially in context of lookups -- usually associates with locals() i.e. a namespace of a function/method execution frame or a namespace of a class, during definition of that class... So 'locallookup' can be confusing.
Why not just 'getclassattribute' or 'classlookup', or 'classattribute'...?
I don't particularly like locallookup either, but haven't found a better name yet. "lookup_in_class" 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 _PyType_Lookup, with "local" meaning "only in this class, don't recurse in the rest of the MRO".
Ronald
- 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 ]