[Python-checkins] r84641 - in python/branches/py3k: Doc/library/cmd.rst Lib/cmd.py Lib/test/test_cmd.py
raymond.hettinger
python-checkins at python.org
Thu Sep 9 05:53:22 CEST 2010
Author: raymond.hettinger
Date: Thu Sep 9 05:53:22 2010
New Revision: 84641
Log:
Add docstring to cmd.Cmd.do_help()
Modified:
python/branches/py3k/Doc/library/cmd.rst
python/branches/py3k/Lib/cmd.py
python/branches/py3k/Lib/test/test_cmd.py
Modified: python/branches/py3k/Doc/library/cmd.rst
==============================================================================
--- python/branches/py3k/Doc/library/cmd.rst (original)
+++ python/branches/py3k/Doc/library/cmd.rst Thu Sep 9 05:53:22 2010
@@ -312,10 +312,6 @@
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
Modified: python/branches/py3k/Lib/cmd.py
==============================================================================
--- python/branches/py3k/Lib/cmd.py (original)
+++ python/branches/py3k/Lib/cmd.py Thu Sep 9 05:53:22 2010
@@ -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:
Modified: python/branches/py3k/Lib/test/test_cmd.py
==============================================================================
--- python/branches/py3k/Lib/test/test_cmd.py (original)
+++ python/branches/py3k/Lib/test/test_cmd.py Thu Sep 9 05:53:22 2010
@@ -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
More information about the Python-checkins
mailing list