]> granicus.if.org Git - python/commitdiff
Support keyword and topics help in cli(). Fixes #715782.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 14 Jun 2003 09:03:46 +0000 (09:03 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 14 Jun 2003 09:03:46 +0000 (09:03 +0000)
Lib/pydoc.py
Misc/NEWS

index fe114fd78286e6467318d39ebc0a189e01a9a33b..abafc0e6b4703f6fa0a4de3be680e633eaaed34a 100755 (executable)
@@ -2116,7 +2116,7 @@ def cli():
                     else:
                         writedoc(arg)
                 else:
-                    doc(arg)
+                    help.help(arg)
             except ErrorDuringImport, value:
                 print value
 
@@ -2126,9 +2126,11 @@ def cli():
 
 %s <name> ...
     Show text documentation on something.  <name> may be the name of a
-    function, module, or package, or a dotted reference to a class or
-    function within a module or module in a package.  If <name> contains
-    a '%s', it is used as the path to a Python source file to document.
+    Python keyword, topic, function, module, or package, or a dotted
+    reference to a class or function within a module or module in a
+    package.  If <name> contains a '%s', it is used as the path to a
+    Python source file to document. If name is 'keywords', 'topics',
+    or 'modules', a listing of these things is displayed.
 
 %s -k <keyword>
     Search for a keyword in the synopsis lines of all available modules.
index 07a5b57c2ddcf75fe7947610b5674ab52e52dda9..1346c58834c49aa8578101fb0f89464cd1b65b5e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -111,6 +111,8 @@ Library
 Tools/Demos
 -----------
 
+- pydoc now offers help on keywords and topics.
+
 - Tools/idle is gone; long live Lib/idlelib.
 
 - diff.py is a new script for print file diffs in context, unified, or ndiff