From: Raymond Hettinger Date: Mon, 16 Jul 2012 07:11:05 +0000 (-0700) Subject: Issue 15337: help() shown as undocumented X-Git-Tag: v2.7.4rc1~697 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66dd94199c00bc059fc70bb246db01b60f5a650a;p=thirdparty%2FPython%2Fcpython.git Issue 15337: help() shown as undocumented --- diff --git a/Lib/cmd.py b/Lib/cmd.py index ae7f12ef1811..05ba7e3bc6b7 100644 --- a/Lib/cmd.py +++ b/Lib/cmd.py @@ -294,6 +294,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 8bb4e63592e6..ed9258b1bfe1 100644 --- a/Lib/test/test_cmd.py +++ b/Lib/test/test_cmd.py @@ -84,11 +84,11 @@ class samplecmdclass(cmd.Cmd): Documented commands (type help ): ======================================== - add + add help Undocumented commands: ====================== - exit help shell + exit shell Test for the function print_topics(): @@ -125,11 +125,11 @@ class samplecmdclass(cmd.Cmd): Documented commands (type help ): ======================================== - add + add help Undocumented commands: ====================== - exit help shell + exit shell help text for add Hello from postloop