Inspect module - getargspec raise TypeError for built-in functions

Nadav Chernin Nadav.C at qualisystems.com
Tue Dec 1 05:24:23 EST 2009


Hi, all

 

When I use getargspec(func) for user-defined function, all is working
OK, but using it for built-in functions raise TypeError:

 

>>> import sys

>>> getargspec(sys.getsizeof)

 

Traceback (most recent call last):

  File "<pyshell#15>", line 1, in <module>

    getargspec(sys.getsizeof)

  File "C:\Python26\lib\inspect.py", line 803, in getargspec

    raise TypeError('arg is not a Python function')

TypeError: arg is not a Python function

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091201/259cd2f7/attachment-0001.html>


More information about the Python-list mailing list