title: Python inspect.getargspec with built-in function
body: <p>I'm trying to figure out the arguments of a method retrieved from a module.
  I found an <code>inspect</code> module with a handy function, <code>getargspec</code>.
  It works for a function that I define, but won't work for functions from an imported module.</p>
  
  <pre><code>import math, inspect
  def foobar(a,b=11): pass
  inspect.getargspec(foobar)  # this works
  inspect.getargspec(math.sin) # this doesn't
  </code></pre>
  
  <p>I'll get an error like this:</p>
  
  <pre><code>   File "C:\...\Python 2.5\Lib\inspect.py", line 743, in getargspec
       raise TypeError('arg is not a Python function')
   TypeError: arg is not a Python function
  </code></pre>
  
  <p>Is <code>inspect.getargspec</code> designed only for local functions or am I doing something wrong?</p>