summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-02-11 07:23:13 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-02-11 07:23:13 (GMT)
commit3420057adbb1076875e448c52f03d9e3b2a40956 (patch)
tree091382a0e1d386515c8739201a82b6986fcf939a /Lib
parent4e08f786f042f09454939a1a7a16ccea70488093 (diff)
downloadcpython-3420057adbb1076875e448c52f03d9e3b2a40956.zip
cpython-3420057adbb1076875e448c52f03d9e3b2a40956.tar.gz
cpython-3420057adbb1076875e448c52f03d9e3b2a40956.tar.bz2
Closes #17158: Add 'symbols' to help() welcome message; clarify 'modules spam'
messages.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 81fcfd9..5a5a481 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1847,10 +1847,10 @@ Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".
-To get a list of available modules, keywords, or topics, type "modules",
-"keywords", or "topics". Each module also comes with a one-line summary
-of what it does; to list the modules whose summaries contain a given word
-such as "spam", type "modules spam".
+To get a list of available modules, keywords, symbols, or topics, type
+"modules", "keywords", "symbols", or "topics". Each module also comes
+with a one-line summary of what it does; to list the modules whose name
+or summary contain a given string such as "spam", type "modules spam".
''' % tuple([sys.version[:3]]*2))
def list(self, items, columns=4, width=80):
@@ -1955,9 +1955,10 @@ module "pydoc_data.topics" could not be found.
def listmodules(self, key=''):
if key:
self.output.write('''
-Here is a list of matching modules. Enter any module name to get more help.
+Here is a list of modules whose name or summary contains '{}'.
+If there are any, enter a module name to get more help.
-''')
+'''.format(key))
apropos(key)
else:
self.output.write('''
@@ -1976,7 +1977,7 @@ Please wait a moment while I gather a list of all available modules...
self.list(modules.keys())
self.output.write('''
Enter any module name to get more help. Or, type "modules spam" to search
-for modules whose descriptions contain the word "spam".
+for modules whose name or summary contain the string "spam".
''')
help = Helper()