Peng Yu wrote:

> Hi,
> 
> 'open' is not a function according to inspect module. But according to
> help(open), it is a function. Is there something wrong with inspect
> module?
> 
> $ cat main.py
> #!/usr/bin/env python
> 
> import inspect
> 
> def hello():
>   print "Hello World!"
>   return
> 
> print inspect.isfunction(str)
> print inspect.isfunction(open)
> print inspect.isfunction(hello)

help (inspect.isfunction) gives

Help on function isfunction in module inspect:

isfunction(object)
    Return true if the object is a user-defined function.


        Mel.



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to