mirror of
https://github.com/python/cpython.git
synced 2025-09-19 15:10:58 +00:00
Issue #9118: help(None) will now return NoneType doc instead of
starting interactive help.
This commit is contained in:
parent
766f5d9d73
commit
2e733c9625
1 changed files with 3 additions and 2 deletions
|
@ -1705,8 +1705,9 @@ class Helper:
|
||||||
return ''
|
return ''
|
||||||
return '<pydoc.Helper instance>'
|
return '<pydoc.Helper instance>'
|
||||||
|
|
||||||
def __call__(self, request=None):
|
_GoInteractive = object()
|
||||||
if request is not None:
|
def __call__(self, request=_GoInteractive):
|
||||||
|
if request is not self._GoInteractive:
|
||||||
self.help(request)
|
self.help(request)
|
||||||
else:
|
else:
|
||||||
self.intro()
|
self.intro()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue