A strange thing from novice, can anybody now why this is happening?

赵孟 shizhaojingszj at yahoo.com.cn
Wed Jul 27 13:11:31 CEST 2011


Hi, everyone, sorry to bother you, but i have got a question about
inspect.py and imp.py. As  a novice to python, i am glad to find the
inspect.py. But when i try to INSPECT sth. in imp.py, i got some error
message.
The following is the interactive process from ipython.
_____________
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32
Type "copyright", "credits" or "license" for mo

IPython 0.10.1 -- An enhanced Interactive Pytho
?         -> Introduction and overview of IPyth
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object al

In [1]: import inspect

In [2]: import imp

In [3]: inspect.ismethod(imp.get_suffixes)
Out[3]: False

In [4]: inspect.isfunction(imp.get_suffixes)
Out[4]: False

In [5]: type(imp.get_suffixes)
Out[5]: <type 'builtin_function_or_method'>

In [6]:
______________

i am wondering why type of this get_suffixes() method is 'method', but i
cannot get the source by using inspect.getsource(). Can anybody tell me why
this is happening ,please ?

Best Wishes!

Meng Zhao

-- 
赵孟 (*^__^*)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/mailman-coders/attachments/20110727/ff39ba17/attachment.html>


More information about the Mailman-coders mailing list