<br><div class="gmail_quote">On Mon, Sep 26, 2011 at 10:16 AM, Devin Jeanpierre <span dir="ltr"><<a href="mailto:jeanpierreda@gmail.com">jeanpierreda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> The keyword nonlocal means that this binding is not local to this scope but<br>
> can be found up the call stack.<br>
<br>
</div>Lexical stack. (The call stack would be dynamic scope. [I suspect you<br>
already know this; I am pedant<br></blockquote><div><br></div><div>Yeah, I know that but a perfect example of how easy it is to get confused. :-)</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> In contrast, your usage means the binding is<br>
> local to this function, created before the function is called the first time<br>
> and shared with all calls to this function. Those are orthogonal scopes.<br>
<br>
</div>Not really. Created differently, yes. But after creation it works<br>
identically, by definition.<br></blockquote><div><br></div><div>To a python developer, sure. To a python programmer, I don't think so. </div><div><br></div><div>--- Bruce</div></div>