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

Method __call__

Lib/pydoc.py:2007–2021  ·  view source on GitHub ↗
(self, request=_GoInteractive)

Source from the content-addressed store, hash-verified

2005
2006 _GoInteractive = object()
2007 def __call__(self, request=_GoInteractive):
2008 if request is not self._GoInteractive:
2009 try:
2010 self.help(request)
2011 except ImportError as err:
2012 self.output.write(f'{err}\n')
2013 else:
2014 self.intro()
2015 self.interact()
2016 self.output.write('''
2017You are now leaving help and returning to the Python interpreter.
2018If you want to ask for help on a particular object directly from the
2019interpreter, you can type "help(object)". Executing "help('string')"
2020has the same effect as typing a particular string at the help> prompt.
2021''')
2022
2023 def interact(self):
2024 self.output.write('\n')

Callers

nothing calls this directly

Calls 4

helpMethod · 0.95
introMethod · 0.95
interactMethod · 0.95
writeMethod · 0.45

Tested by

no test coverage detected