Issue #9118: help(None) will now return NoneType doc instead of

starting interactive help.
This commit is contained in:
Alexander Belopolsky 2010-07-04 17:00:20 +00:00
parent 766f5d9d73
commit 2e733c9625
1 changed files with 3 additions and 2 deletions

View File

@ -1705,8 +1705,9 @@ class Helper:
return ''
return '<pydoc.Helper instance>'
def __call__(self, request=None):
if request is not None:
_GoInteractive = object()
def __call__(self, request=_GoInteractive):
if request is not self._GoInteractive:
self.help(request)
else:
self.intro()