Python inspecione.getargspec com função interna

Eu estou tentando descobrir os argumentos de um método recuperado de um módulo. Eu encontrei uminspect módulo com uma função útil,getargspec. Ele funciona para uma função que eu defino, mas não funciona para funções de um módulo importado.

import math, inspect
def foobar(a,b=11): pass
inspect.getargspec(foobar)  # this works
inspect.getargspec(math.sin) # this doesn't

Vou receber um erro como este:

   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

Éinspect.getargspec projetado apenas para funções locais ou estou fazendo algo errado?

questionAnswers(2)

yourAnswerToTheQuestion