<div class="gmail_quote">On Fri, Nov 4, 2011 at 4:15 PM, Jan Kaliszewski <span dir="ltr"><<a href="mailto:zuo@chopin.edu.pl">zuo@chopin.edu.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Guido van Rossum dixit (2011-11-04, 13:49):<br>
<div class="im"><br>
> On Fri, Nov 4, 2011 at 12:38 PM, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>
> > On Sun, 30 Oct 2011 09:52:15 +1000<br>
> > Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
</div>[snip]<br>
<div class="im">> >> For nested functions, I suggest adding something to the qname to<br>
> >> directly indicate that the scope is hidden. Adding parentheses to the<br>
> >> name of the outer function would probably work:<br>
> >><br>
> >> f().g<br>
> ><br>
> > I don't know, I find the "()" a bit too smart. I'd like Guido's<br>
> > advice on the matter.<br>
><br>
> Hm. Both 'f.g' and 'f().g' for f().__qname__ are misleading, since both<br>
> look like valid expressions but neither will actually retrieve the intended<br>
> object. I'd be tempted to return something like '<local in f>.g' where 'f'<br>
> would be f.__qname__. And yes, if f.__qname__ were '<local in xyzzy>.f',<br>
> then f().__qname__ should be '<local in <local in xyzzy>.f>.g'.<br>
><br>
> Alternatively perhaps I could live with 'f.<locals>.g' and<br>
> 'xyzzy.<locals>.f.<locals>.g'.<br>
<br>
</div>And what about:<br>
<br>
<f locals>.g<br>
and<br>
<<xyzzy locals>.f locals>.g<br></blockquote><div><br>In the end I like the non-nested version better. <br></div></div><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)<br>