[Python-ideas] PEP 3155 - Qualified name for classes and functions

Joshua Landau joshua.landau.ws at gmail.com
Sat Nov 5 02:43:40 CET 2011


First of all - hello python-ideas. I liked the look of the archives, so I
thought I'd chip in, if it's OK.


>  And what about:
>>
>>    <f locals>.g
>> and
>>    <<xyzzy locals>.f locals>.g
>>
>
> In the end I like the non-nested version better.
>
xyzzy.<local f>.<local g>
or, preferably,
xyzzy.<instance.f>.<instance.g>
It's non-nested, shows the locality and maps the locality to the variable.

If not showing function instances is disliked, maybe drop the period
between the function and "<locals>" from yours:
xyzzy<locals>.f<locals>.g
or, again,
xyzzy<instance>.f<instance>.g

I think this is just cleaner than:
xyzzy.<locals>.f.<locals>.g
because it doesn't imply that xyzzy has a single set of locals - especially
using <instance>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111105/2c5b03cf/attachment.html>


More information about the Python-ideas mailing list