How do I ask a function for the names of its parameters in Python?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/582056/getting-list-of-parameters-inside-python-function">Getting list of parameters inside python function</a>  </p>
</blockquote>



<p>E.g. supposes I have</p>

<pre><code>def foo(a, b='B'): return
</code></pre>

<p>How can I ask foo to tell me that it has required parameter 'a', and parameter 'b', which has 'B' as it's default value?</p>
