]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112007: Re-organize help utility intro message (#112017)
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 13 Nov 2023 19:24:03 +0000 (14:24 -0500)
committerGitHub <noreply@github.com>
Mon, 13 Nov 2023 19:24:03 +0000 (14:24 -0500)
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>
Lib/pydoc.py

index c9a55799b39f0ce56dae3fa10fc524f2676691ae..be41592cc64bad5bca3f60aa5266f791562df7d7 100755 (executable)
@@ -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):