diff options
author | Georg Brandl <georg@python.org> | 2014-10-31 09:25:48 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-31 09:25:48 (GMT) |
commit | 8ed75cd8e931c075c38246fbd50dd5f18defdba6 (patch) | |
tree | 7d7ce1750916737af0a92d0c9b47163abb5cec3f /Doc/library/pydoc.rst | |
parent | 2677faecf5c967b1078eb2de94a32d5f722511e4 (diff) | |
download | cpython-8ed75cd8e931c075c38246fbd50dd5f18defdba6.zip cpython-8ed75cd8e931c075c38246fbd50dd5f18defdba6.tar.gz cpython-8ed75cd8e931c075c38246fbd50dd5f18defdba6.tar.bz2 |
#22613: minor other fixes in library docs (thanks Jacques Ducasse)
Diffstat (limited to 'Doc/library/pydoc.rst')
-rw-r--r-- | Doc/library/pydoc.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index eebd501..6037310 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -20,6 +20,13 @@ The :mod:`pydoc` module automatically generates documentation from Python modules. The documentation can be presented as pages of text on the console, served to a Web browser, or saved to HTML files. +For modules, classes, functions and methods, the displayed documentation is +derived from the docstring (i.e. the :attr:`__doc__` attribute) of the object, +and recursively of its documentable members. If there is no docstring, +:mod:`pydoc` tries to obtain a description from the block of comment lines just +above the definition of the class, function or method in the source file, or at +the top of the module (see :func:`inspect.getcomments`). + The built-in function :func:`help` invokes the online help system in the interactive interpreter, which uses :mod:`pydoc` to generate its documentation as text on the console. The same text documentation can also be viewed from |