Defining functions inside of other functions
<p>I defined a function inside of a function in a program (Python):</p>

<pre><code>def func1:
   x = 5
   def func2(y):
      return x*y

x = 4
print func2(5)
</code></pre>

<p>How does the scope for x here work, with AND without the line that redefines x=4?
Is this language-specific behavior?</p>