mirror of
https://github.com/python/cpython.git
synced 2025-08-12 12:58:50 +00:00
[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 b28bb130bb
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
dfdbfc548f
commit
02fdb42018
1 changed files with 13 additions and 11 deletions
24
Lib/pydoc.py
24
Lib/pydoc.py
|
@ -2075,20 +2075,22 @@ has the same effect as typing a particular string at the help> prompt.
|
||||||
self.output.write('\n')
|
self.output.write('\n')
|
||||||
|
|
||||||
def intro(self):
|
def intro(self):
|
||||||
self.output.write('''
|
self.output.write('''\
|
||||||
Welcome to Python {0}'s help utility!
|
Welcome to Python {0}'s help utility! If this is your first time using
|
||||||
|
Python, you should definitely check out the tutorial at
|
||||||
If this is your first time using Python, you should definitely check out
|
https://docs.python.org/{0}/tutorial/.
|
||||||
the tutorial on the internet at https://docs.python.org/{0}/tutorial/.
|
|
||||||
|
|
||||||
Enter the name of any module, keyword, or topic to get help on writing
|
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
|
Python programs and using Python modules. To get a list of available
|
||||||
return to the interpreter, just type "quit".
|
modules, keywords, symbols, or topics, enter "modules", "keywords",
|
||||||
|
"symbols", or "topics".
|
||||||
|
|
||||||
To get a list of available modules, keywords, symbols, or topics, type
|
Each module also comes with a one-line summary of what it does; to list
|
||||||
"modules", "keywords", "symbols", or "topics". Each module also comes
|
the modules whose name or summary contain a given string such as "spam",
|
||||||
with a one-line summary of what it does; to list the modules whose name
|
enter "modules spam".
|
||||||
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]))
|
'''.format('%d.%d' % sys.version_info[:2]))
|
||||||
|
|
||||||
def list(self, items, columns=4, width=80):
|
def list(self, items, columns=4, width=80):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue