@@ -2189,9 +2189,7 @@ def getline(self, prompt):
2189
2189
def help (self , request , is_cli = False ):
2190
2190
if isinstance (request , str ):
2191
2191
request = request .strip ()
2192
- if request == 'help' :
2193
- self .helphelp ()
2194
- elif request == 'keywords' : self .listkeywords ()
2192
+ if request == 'keywords' : self .listkeywords ()
2195
2193
elif request == 'symbols' : self .listsymbols ()
2196
2194
elif request == 'topics' : self .listtopics ()
2197
2195
elif request == 'specialnames' :
@@ -2207,36 +2205,10 @@ def help(self, request, is_cli=False):
2207
2205
elif request in self .topics : self .showtopic (request )
2208
2206
elif request : doc (request , 'Help on %s:' , output = self ._output , is_cli = is_cli )
2209
2207
else : doc (str , 'Help on %s:' , output = self ._output , is_cli = is_cli )
2210
- elif request is builtins .help :
2211
- self .helphelp ()
2208
+ elif isinstance (request , Helper ): self ()
2212
2209
else : doc (request , 'Help on %s:' , output = self ._output , is_cli = is_cli )
2213
2210
self .output .write ('\n ' )
2214
2211
2215
- def helphelp (self ):
2216
- pager (textwrap .dedent ("""\
2217
- help - Interactive Help
2218
- =======================
2219
-
2220
- The built-in help function implements an interactive help utility. You
2221
- can make use of it in a few different ways:
2222
-
2223
- * Calling help() with no arguments starts an interactive help session.
2224
-
2225
- * The behavior of help(x) depends on x's type:
2226
-
2227
- * If x is a string, help(x) provides information about the given
2228
- topic. For example, help("class") will provide information about
2229
- the "class" keyword, and help("math.sqrt") will provide
2230
- information about the "math.sqrt" function.
2231
-
2232
- * If x is a class or a built-in type, help(x) provides information
2233
- about that type. For example, help(str) will provide information
2234
- about the str type.
2235
-
2236
- * For all other objects, help(x) prints information about x's type.
2237
- For example, help(20) will provide information about the int type.
2238
- """ ))
2239
-
2240
2212
def intro (self ):
2241
2213
self .output .write (_introdoc ())
2242
2214
0 commit comments