Skip to content

Commit 46081fe

Browse files
[3.11] gh-112007: Re-organize help utility intro message (GH-112017) (#112048)
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 b28bb13) Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 4baf633 commit 46081fe

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

Lib/pydoc.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,20 +2073,22 @@ def help(self, request, is_cli=False):
20732073
self.output.write('\n')
20742074

20752075
def intro(self):
2076-
self.output.write('''
2077-
Welcome to Python {0}'s help utility!
2078-
2079-
If this is your first time using Python, you should definitely check out
2080-
the tutorial on the internet at https://docs.python.org/{0}/tutorial/.
2076+
self.output.write('''\
2077+
Welcome to Python {0}'s help utility! If this is your first time using
2078+
Python, you should definitely check out the tutorial at
2079+
https://docs.python.org/{0}/tutorial/.
20812080
20822081
Enter the name of any module, keyword, or topic to get help on writing
2083-
Python programs and using Python modules. To quit this help utility and
2084-
return to the interpreter, just type "quit".
2082+
Python programs and using Python modules. To get a list of available
2083+
modules, keywords, symbols, or topics, enter "modules", "keywords",
2084+
"symbols", or "topics".
2085+
2086+
Each module also comes with a one-line summary of what it does; to list
2087+
the modules whose name or summary contain a given string such as "spam",
2088+
enter "modules spam".
20852089
2086-
To get a list of available modules, keywords, symbols, or topics, type
2087-
"modules", "keywords", "symbols", or "topics". Each module also comes
2088-
with a one-line summary of what it does; to list the modules whose name
2089-
or summary contain a given string such as "spam", type "modules spam".
2090+
To quit this help utility and return to the interpreter,
2091+
enter "q" or "quit".
20902092
'''.format('%d.%d' % sys.version_info[:2]))
20912093

20922094
def list(self, items, columns=4, width=80):

0 commit comments

Comments
 (0)