Are you allowed to modify func_defaults (__defaults__ in Python 3.x) in Python?
<p>I've tried doing this in Python 2.6, and it does "work":</p>

<pre><code>&gt;&gt;&gt; def f(i='I'): return i
...
&gt;&gt;&gt; f.func_defaults = (10,)
&gt;&gt;&gt; f()
10
</code></pre>

<p>But is this officially specified behavior, or am I hitting an implementation-specific behavior?</p>
