diff options
author | Raymond Hettinger <python@rcn.com> | 2010-09-09 03:53:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-09-09 03:53:22 (GMT) |
commit | 44d7b6ad60c151d2a265c326c1f7cf26d3c9dc18 (patch) | |
tree | d294781112900852e67666d7965abb1f6bc97c5f /Lib | |
parent | bd889e8c40da62b4a2aaa99d2b1ef50291b49342 (diff) | |
download | cpython-44d7b6ad60c151d2a265c326c1f7cf26d3c9dc18.zip cpython-44d7b6ad60c151d2a265c326c1f7cf26d3c9dc18.tar.gz cpython-44d7b6ad60c151d2a265c326c1f7cf26d3c9dc18.tar.bz2 |
Add docstring to cmd.Cmd.do_help()
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/cmd.py | 1 | ||||
-rw-r--r-- | Lib/test/test_cmd.py | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -288,6 +288,7 @@ class Cmd: return list(commands | topics) def do_help(self, arg): + 'List available commands with "help" or detailed help with "help cmd".' if arg: # XXX check arg syntax try: diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py index 75aa6bb..a1799f9 100644 --- a/Lib/test/test_cmd.py +++ b/Lib/test/test_cmd.py @@ -84,11 +84,11 @@ class samplecmdclass(cmd.Cmd): <BLANKLINE> Documented commands (type help <topic>): ======================================== - add + add help <BLANKLINE> Undocumented commands: ====================== - exit help shell + exit shell <BLANKLINE> Test for the function print_topics(): @@ -125,11 +125,11 @@ class samplecmdclass(cmd.Cmd): <BLANKLINE> Documented commands (type help <topic>): ======================================== - add + add help <BLANKLINE> Undocumented commands: ====================== - exit help shell + exit shell <BLANKLINE> help text for add Hello from postloop |