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

Skip to content

Commit b28bb13

Browse files
terryjreedyhugovk
andauthored
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>
1 parent d5491a6 commit b28bb13

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)
0