擅长:python、mysql、java
<p>我相信这就是创建python模块的C-API的方式。例如:</p>
<pre><code>>>> import inspect
>>> inspect.getargspec(math.log)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\inspect.py", line 813, in getargspec
raise TypeError('{!r} is not a Python function'.format(func))
TypeError: <built-in function log> is not a Python function
</code></pre>
<p>唯一的方法(据我所知)是查看内置函数的方法参数,就是查看doc字符串。在</p>
^{pr2}$
<p>我编写了自己的C python模块,并寻找了“修复”(…)的方法,解决方法是将它放在doc字符串中,我认为这很容易出错,因为每次更改函数时都要更新doc字符串。在</p>