MCPcopy Index your code
hub / github.com/python/cpython / help

Method help

Lib/pydoc.py:2054–2073  ·  view source on GitHub ↗
(self, request, is_cli=False)

Source from the content-addressed store, hash-verified

2052 return self.input.readline()
2053
2054 def help(self, request, is_cli=False):
2055 if isinstance(request, str):
2056 request = request.strip()
2057 if request == 'keywords': self.listkeywords()
2058 elif request == 'symbols': self.listsymbols()
2059 elif request == 'topics': self.listtopics()
2060 elif request == 'modules': self.listmodules()
2061 elif request[:8] == 'modules ':
2062 self.listmodules(request.split()[1])
2063 elif request in self.symbols: self.showsymbol(request)
2064 elif request in ['True', 'False', 'None']:
2065 # special case these keywords since they are objects too
2066 doc(eval(request), 'Help on %s:', output=self._output, is_cli=is_cli)
2067 elif request in self.keywords: self.showtopic(request)
2068 elif request in self.topics: self.showtopic(request)
2069 elif request: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)
2070 else: doc(str, 'Help on %s:', output=self._output, is_cli=is_cli)
2071 elif isinstance(request, Helper): self()
2072 else: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)
2073 self.output.write('\n')
2074
2075 def intro(self):
2076 self.output.write(_introdoc())

Callers 8

__call__Method · 0.95
interactMethod · 0.95
run_pydoc_for_requestMethod · 0.95
run_pydoc_pagerMethod · 0.95
__call__Method · 0.45
cliFunction · 0.45

Calls 10

listkeywordsMethod · 0.95
listsymbolsMethod · 0.95
listtopicsMethod · 0.95
listmodulesMethod · 0.95
showsymbolMethod · 0.95
showtopicMethod · 0.95
docFunction · 0.85
stripMethod · 0.45
splitMethod · 0.45
writeMethod · 0.45

Tested by 4

run_pydoc_for_requestMethod · 0.76
run_pydoc_pagerMethod · 0.76