]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add docstring to cmd.Cmd.do_help()
authorRaymond Hettinger <python@rcn.com>
Thu, 9 Sep 2010 03:53:22 +0000 (03:53 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 9 Sep 2010 03:53:22 +0000 (03:53 +0000)
Doc/library/cmd.rst
Lib/cmd.py
Lib/test/test_cmd.py

index b72a49f167b85c5bb1bca72a60bd3022850b3b46..d713b8f6dc32f8db1433cc32fc70df18a6d64b42 100644 (file)
@@ -312,10 +312,6 @@ blank lines to repeat commands, and the simple record and playback facility::
     bye     color    goto     home  playback  record  right
     circle  forward  heading  left  position  reset   undo
 
-    Undocumented commands:
-    ======================
-    help
-
     (turtle) help forward
     Move the turtle forward by the specified distance:  FORWARD 10
     (turtle) record spiral.cmd
index 85282f89a6b339d4d1b6bc3a1bb24fb2179a63b7..8fa7d019b5505ed9bd9f6b810916f3bd6ddb7b64 100644 (file)
@@ -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:
index 75aa6bbd1a1bbdf416cb7bc1a49faff2c6c9f259..a1799f915fe3b4b675866c6b11794ed9c647934b 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