[Python-checkins] r83565 - python/branches/py3k/Doc/library/cmd.rst
python-checkins at python.org
Mon Aug 2 22:27:20 CEST 2010
Date: Mon Aug 2 22:27:20 2010
New Revision: 83565
#9111: document that do_help() looks at docstrings.
--- python/branches/py3k/Doc/library/cmd.rst (original)
+++ python/branches/py3k/Doc/library/cmd.rst Mon Aug 2 22:27:20 2010
@@ -76,11 +76,13 @@
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)
More information about the Python-checkins