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

Antoine Pitrou solipsis at pitrou.net
Mon Nov 7 01:04:35 CET 2011


On Sat, 5 Nov 2011 18:37:14 -0700
Guido van Rossum <guido at python.org> wrote:
> On Sat, Nov 5, 2011 at 3:31 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> > I think you're all overthinking this. We want a notation that:
> > 1. Makes it clear attribute access won't work
> > 2. Indicates where the nested definition really lives
> > 3. Gives a reasonable error message if you do try to evaluate it
> >
> > "f.<locals>.g" ticks all those boxes, so it's fine.
> >
> 
> +1. Let's stop the bikeshedding.

I've now updated the PEP and the implementation for "f.<locals>.g" to be
the __qname__ value in that case.

Regards

Antoine.





More information about the Python-ideas mailing list