diff --git a/Lib/pydoc.py b/Lib/pydoc.py index fe114fd7828..abafc0e6b47 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -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 ... Show text documentation on something. 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 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 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 Search for a keyword in the synopsis lines of all available modules. diff --git a/Misc/NEWS b/Misc/NEWS index 07a5b57c2dd..1346c58834c 100644 --- 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