Where is the default parameter in Python function
<p>I think many people have seen the python's function which receives default parameters. For example:</p>

<pre><code>def foo(a=[]):
    a.append(3)
    return a
</code></pre>

<p>If we call this function using foo(), the output will append integer '3' each time after the call.</p>

<p>When this function is defined, a function object named 'foo' is defined in the current environment, and also the default parameter values are evaluated at this time. Every time when the function is called without a parameter, the evaluated parameter value will be changed according to the code.</p>

<p>My question is, <strong>where is this evaluated parameter exist?</strong> 
<strong>Is it in the function object or it is in the method object when calling the function?</strong>
Since everything in python is a object, there must be some place to hold the name->value binding of 'a'-->evaluated parameter. Am I over-thinking this problem?</p>
