]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-112007: Re-organize help utility intro message (GH-112017) (#112047)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 13 Nov 2023 19:55:33 +0000 (20:55 +0100)
committerGitHub <noreply@github.com>
Mon, 13 Nov 2023 19:55:33 +0000 (19:55 +0000)
gh-112007: Re-organize help utility intro message (GH-112017)

Most important: move how-to-quit sentence to the end and mention 'q'.
Re-group the other sentences and improve some wording.
---------

(cherry picked from commit b28bb130bbc2ad956828819967d83e06d30a65c5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/pydoc.py

index 185f09e603df2ebb8d224b010afc00ea2bf5a9cd..84bbf588dc9201713227d698db074c2785640904 100755 (executable)
@@ -2075,20 +2075,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):