File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,12 @@ def __call__(self):
87
87
88
88
class _Helper (object ):
89
89
"""Define the builtin 'help'.
90
- This is a wrapper around pydoc.help (with a twist).
91
90
91
+ This is a wrapper around pydoc.help that provides a helpful message
92
+ when 'help' is typed at the Python interactive prompt.
93
+
94
+ Calling help() at the Python prompt starts an interactive help session.
95
+ Calling help(thing) prints help for the python object 'thing'.
92
96
"""
93
97
94
98
def __repr__ (self ):
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
"""Generate Python documentation in HTML or text for interactive use.
3
3
4
- In the Python interpreter, do "from pydoc import help" to provide
5
- help. Calling help(thing) on a Python object documents the object.
4
+ At the Python interactive prompt, calling help(thing) on a Python object
5
+ documents the object, and calling help() starts up an interactive
6
+ help session.
6
7
7
8
Or, at the shell command line outside of Python:
8
9
@@ -1865,7 +1866,7 @@ def help(self, request):
1865
1866
1866
1867
def intro (self ):
1867
1868
self .output .write ('''
1868
- Welcome to Python %s! This is the interactive help utility.
1869
+ Welcome to Python %s's help utility!
1869
1870
1870
1871
If this is your first time using Python, you should definitely check out
1871
1872
the tutorial on the Internet at http://docs.python.org/%s/tutorial/.
You can’t perform that action at this time.
0 commit comments