8000 [3.12] gh-112007: Re-organize help utility intro message (GH-112017) … · python/cpython@02fdb42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02fdb42

Browse files
[3.12] gh-112007: Re-organize help utility intro message (GH-112017) (#112047)
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 <tjreedy@udel.edu>
1 parent dfdbfc5 commit 02fdb42

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
@@ -2075,20 +2075,22 @@ def help(self, request, is_cli=False):
20752075
self.output.write('\n')
20762076

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

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

0 commit comments

Comments
 (0)
0