summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2023-11-13 19:24:03 (GMT)
committerGitHub <noreply@github.com>2023-11-13 19:24:03 (GMT)
commitb28bb130bbc2ad956828819967d83e06d30a65c5 (patch)
tree0782071592a4235b1d0414a0db6108310693131e /Lib/pydoc.py
parentd5491a6eff516ad47906bd91a13d71cdde18f5ab (diff)
downloadcpython-b28bb130bbc2ad956828819967d83e06d30a65c5.zip
cpython-b28bb130bbc2ad956828819967d83e06d30a65c5.tar.gz
cpython-b28bb130bbc2ad956828819967d83e06d30a65c5.tar.bz2
gh-112007: Re-organize help utility intro message (#112017)
Most important: move how-to-quit sentence to the end and mention 'q'. Re-group the other sentences and improve some wording. --------- Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index c9a5579..be41592 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -2073,20 +2073,22 @@ has the same effect as typing a particular string at the help> prompt.
self.output.write('\n')
def intro(self):
- self.output.write('''
-Welcome to Python {0}'s help utility!
-
-If this is your first time using Python, you should definitely check out
-the tutorial on the internet at https://docs.python.org/{0}/tutorial/.
+ self.output.write('''\
+Welcome to Python {0}'s help utility! If this is your first time using
+Python, you should definitely check out the tutorial at
+https://docs.python.org/{0}/tutorial/.
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".
+Python programs and using Python modules. To get a list of available
+modules, keywords, symbols, or topics, enter "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",
+enter "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".
+To quit this help utility and return to the interpreter,
+enter "q" or "quit".
'''.format('%d.%d' % sys.version_info[:2]))
def list(self, items, columns=4, width=80):