读书人

哪位大神总结一下help的用法?解决方案

发布时间: 2012-04-10 21:03:56 作者: rapoo

哪位大神总结一下help的用法?
哪位大神总结一下help的用法,告诉我怎么查询模块,工厂函数,方法的具体用法,比如说可以看到参数,及参数的意义。

[解决办法]

Python code
>>> help(open)Help on built-in function open in module __builtin__:open(...)    open(name[, mode[, buffering]]) -> file object        Open a file using the file() type, returns a file object.  This is the    preferred way to open a file.  See file.__doc__ for further information.>>> help(os)Help on module os:[About 1242 more lines. Double-click to unfold]>>> a = "a string">>> help(a)no Python documentation found for 'a string'>>> help(a.endswith)Help on built-in function endswith:endswith(...)    S.endswith(suffix[, start[, end]]) -> bool        Return True if S ends with the specified suffix, False otherwise.    With optional start, test S beginning at that position.    With optional end, stop comparing S at that position.    suffix can also be a tuple of strings to try.
[解决办法]
安装目录doc目录下。。。。。。

读书人网 >perl python

热点推荐