Use python function arg as a default argument too
<p>I want to write a function that has a default value that is another input of the function.  I'd like something like this:</p>

<pre><code>def pythag_thm(a, b=a):
    return (a**2 + b**2)**.5
</code></pre>

<p>but I get a <code>NameError: name 'a' is not defined</code>. I realize I could do something like:</p>

<pre><code>def pythag_thm(a, b=False):
     if b==False:
         return (a**2 + a**2)**.5
     else:
         return (a**2 + b**2)**.5
</code></pre>

<p>but this does not seem very 'pythonic'. Is there a clean way to do this? Am I just thinking of this in the wrong way?</p>
