Non-local variable: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 2:
 
== Example ==
In the example that follows there is a nested function <code>inner</code> defined in the scope of another function <code>outer</code>. The variable <code>x</code)> is local to <code>outer</code>, but non-local to <code>inner</code> (nor is it global):
<source lang=python>
def outer():