Python 内建函数 - help([object])
2017-03-16 09:32
344 查看
Manual
直译
实例
拓展阅读
This function is added to the built-in namespace by the site module.
Changed in version 3.4: Changes to pydoc and inspect mean that the reported signatures for callables are now more comprehensive and consistent.
version 3.4变更:pydoc和inspect变动意味着,调用对象的信号报告变得更全面一致。
inspect
直译
实例
拓展阅读
Manual
Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated.This function is added to the built-in namespace by the site module.
Changed in version 3.4: Changes to pydoc and inspect mean that the reported signatures for callables are now more comprehensive and consistent.
直译
援引内建帮助系统(该函数目的是为了交互式使用)。如果未给定参数,则在解释器控制台启动交互式帮助系统。如果参数是字符串,随后会根据字符串查找以此命名的模块、函数、类、方法、关键字或文档主题,并且在控制台上打印帮助页。如果参数是任意其他对象类别,会生成该对象的帮助页。该函数通过节点模块增加到内建命名空间。version 3.4变更:pydoc和inspect变动意味着,调用对象的信号报告变得更全面一致。
实例
>>> import os >>> help(os) Help on module os: NAME os - OS routines for NT or Posix depending on what system we're on. DESCRIPTION This exports: - all functions from posix, nt or ce, e.g. unlink, stat, etc. - os.path is either posixpath or ntpath - os.name is either 'posix', 'nt' or 'ce'. - os.curdir is a string representing the current directory ('.' or ':') - os.pardir is a string representing the parent directory ('..' or '::') - os.sep is the (or a most common) pathname separator ('/' or ':' or '\\') - os.extsep is the extension separator (always '.') - os.altsep is the alternate pathname separator (None or '/') - os.pathsep is the component separator used in $PATH etc - os.linesep is the line separator in text files ('\r' or '\n' or '\r\n') - os.defpath is the default search path for executables - os.devnull is the file path of the null device ('/dev/null', etc.) Programs that import and use 'os' stand a better chance of being portable between different platforms. Of course, they must then only use functions that are defined by all platforms (e.g., unlink and opendir), and leave all pathname manipulation to os.path (e.g., split and join). ... ...
拓展阅读
pydocinspect
相关文章推荐
- Python函数参数传递方式(call by object reference)以及一致性
- Python help()函数用法详解
- Python 里的 super() 函数和 object.__new__ ()、.__del__() 方法
- Python 内建函数 - callable(object)
- Python 内建函数 - ascii(object)
- 关于python中help函数的应用
- Python 内建函数 - hasattr(object, name)
- python中使用zip函数出现<zip object at 0x02A9E418>
- python函数 callable(object)
- Python 内建函数 - exec(object[, globals[, locals]])
- Python help()函数用法详解
- Python help()函数用法详解
- 【转】Python 里的 super() 函数和 object.__new__ ()、.__del__() 方法
- python自省相关函数sys/help/。。
- 零基础学python-14.3 python的文档资源:help函数
- python中3个帮助函数help,dir,type的使用
- Python标准库:内置函数help([object])
- Python 内建函数 - repr(object)
- Python json序列化时default/object_hook指定函数处理
- Python 内建函数 - getattr(object, name[, default])