Add docstring to cmd.Cmd.do_help()
diff --git a/Lib/cmd.py b/Lib/cmd.py
index 85282f8..8fa7d01 100644
--- a/Lib/cmd.py
+++ b/Lib/cmd.py
@@ -288,6 +288,7 @@
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 @@
<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 @@
<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