27 Sep
2011
27 Sep
'11
1:32 a.m.
On Mon, Sep 26, 2011 at 10:16 AM, Devin Jeanpierre
The keyword nonlocal means that this binding is not local to this scope but can be found up the call stack.
Lexical stack. (The call stack would be dynamic scope. [I suspect you already know this; I am pedant
Yeah, I know that but a perfect example of how easy it is to get confused. :-)
In contrast, your usage means the binding is local to this function, created before the function is called the first time and shared with all calls to this function. Those are orthogonal scopes.
Not really. Created differently, yes. But after creation it works identically, by definition.
To a python developer, sure. To a python programmer, I don't think so. --- Bruce