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

-- 
赵孟 (*^__^*)
_______________________________________________
Mailman-coders mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-coders

Reply via email to