]> granicus.if.org Git - python/commitdiff
Issue 15337: help() shown as undocumented
authorRaymond Hettinger <python@rcn.com>
Mon, 16 Jul 2012 07:11:05 +0000 (00:11 -0700)
committerRaymond Hettinger <python@rcn.com>
Mon, 16 Jul 2012 07:11:05 +0000 (00:11 -0700)
Lib/cmd.py
Lib/test/test_cmd.py

index ae7f12ef1811067f8dc6adba8ffba5883331f5e5..05ba7e3bc6b724b59dc5ddd45e0c8e1cb178deba 100644 (file)
@@ -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:
index 8bb4e63592e67d77b32b843336ba95d47d05e1e3..ed9258b1bfe1c12903a2c3e9a60f22c6a63aaac9 100644 (file)
@@ -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