@@ -2189,9 +2189,7 @@ def getline(self, prompt):
21892189 def help (self , request , is_cli = False ):
21902190 if isinstance (request , str ):
21912191 request = request .strip ()
2192- if request == 'help' :
2193- self .helphelp ()
2194- elif request == 'keywords' : self .listkeywords ()
2192+ if request == 'keywords' : self .listkeywords ()
21952193 elif request == 'symbols' : self .listsymbols ()
21962194 elif request == 'topics' : self .listtopics ()
21972195 elif request == 'specialnames' :
@@ -2207,36 +2205,10 @@ def help(self, request, is_cli=False):
22072205 elif request in self .topics : self .showtopic (request )
22082206 elif request : doc (request , 'Help on %s:' , output = self ._output , is_cli = is_cli )
22092207 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 ()
22122209 else : doc (request , 'Help on %s:' , output = self ._output , is_cli = is_cli )
22132210 self .output .write ('\n ' )
22142211
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-
22402212 def intro (self ):
22412213 self .output .write (_introdoc ())
22422214
0 commit comments