16
16
17
17
--------------
18
18
19
- The :mod: `pydoc ` module automatically generates documentation from Python
19
+ The :mod: `! pydoc ` module automatically generates documentation from Python
20
20
modules. The documentation can be presented as pages of text on the console,
21
21
served to a web browser, or saved to HTML files.
22
22
23
23
For modules, classes, functions and methods, the displayed documentation is
24
- derived from the docstring (i.e. the :attr: `__doc__ ` attribute) of the object,
24
+ derived from the docstring (i.e. the :attr: `! __doc__ ` attribute) of the object,
25
25
and recursively of its documentable members. If there is no docstring,
26
- :mod: `pydoc ` tries to obtain a description from the block of comment lines just
26
+ :mod: `! pydoc ` tries to obtain a description from the block of comment lines just
27
27
above the definition of the class, function or method in the source file, or at
28
28
the top of the module (see :func: `inspect.getcomments `).
29
29
30
30
The built-in function :func: `help ` invokes the online help system in the
31
- interactive interpreter, which uses :mod: `pydoc ` to generate its documentation
31
+ interactive interpreter, which uses :mod: `! pydoc ` to generate its documentation
32
32
as text on the console. The same text documentation can also be viewed from
33
33
outside the Python interpreter by running :program: `pydoc ` as a script at the
34
34
operating system's command prompt. For example, running ::
@@ -46,7 +46,7 @@ produced for that file.
46
46
47
47
.. note ::
48
48
49
- In order to find objects and their documentation, :mod: `pydoc ` imports the
49
+ In order to find objects and their documentation, :mod: `! pydoc ` imports the
50
50
module(s) to be documented. Therefore, any code on module level will be
51
51
executed on that occasion. Use an ``if __name__ == '__main__': `` guard to
52
52
only execute code when a file is invoked as a script and not just imported.
@@ -90,7 +90,7 @@ Python interpreter and typed ``import spam``.
90
90
Module docs for core modules are assumed to reside in
91
91
``https://docs.python.org/X.Y/library/ `` where ``X `` and ``Y `` are the
92
92
major and minor version numbers of the Python interpreter. This can
93
- be overridden by setting the :envvar: `PYTHONDOCS ` environment variable
93
+ be overridden by setting the :envvar: `! PYTHONDOCS ` environment variable
94
94
to a different URL or to a local directory containing the Library
95
95
Reference Manual pages.
96
96
@@ -101,7 +101,7 @@ Reference Manual pages.
101
101
The ``-g `` command line option was removed.
102
102
103
103
.. versionchanged :: 3.4
104
- :mod: `pydoc ` now uses :func: `inspect.signature ` rather than
104
+ :mod: `! pydoc ` now uses :func: `inspect.signature ` rather than
105
105
:func: `inspect.getfullargspec ` to extract signature information from
106
106
callables.
107
107
0 commit comments