summaryrefslogtreecommitdiffstats
path: root/Doc/library/cmd.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-02 20:27:20 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-02 20:27:20 (GMT)
commitb2566cfbf9a7d86ea9397ed542819ded4f1e72b3 (patch)
tree30f03d7e915e4d1ebe45156a9300a6c248a4344d /Doc/library/cmd.rst
parent9c491c9b285916d483079fc281461120e9509bd6 (diff)
downloadcpython-b2566cfbf9a7d86ea9397ed542819ded4f1e72b3.zip
cpython-b2566cfbf9a7d86ea9397ed542819ded4f1e72b3.tar.gz
cpython-b2566cfbf9a7d86ea9397ed542819ded4f1e72b3.tar.bz2
#9111: document that do_help() looks at docstrings.
Diffstat (limited to 'Doc/library/cmd.rst')
-rw-r--r--Doc/library/cmd.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
index d27dbae..d789270 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -76,11 +76,13 @@ A :class:`Cmd` instance has the following methods:
are the beginning and ending indexes of the prefix text, which could be used to
provide different completion depending upon which position the argument is in.
- All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This
+ All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This
method, called with an argument ``'bar'``, invokes the corresponding method
- :meth:`help_bar`. With no argument, :meth:`do_help` lists all available help
- topics (that is, all commands with corresponding :meth:`help_\*` methods), and
- also lists any undocumented commands.
+ :meth:`help_bar`, and if that is not present, prints the docstring of
+ :meth:`do_bar`, if available. With no argument, :meth:`do_help` lists all
+ available help topics (that is, all commands with corresponding
+ :meth:`help_\*` methods or commands that have docstrings), and also lists any
+ undocumented commands.
.. method:: Cmd.onecmd(str)