summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-04 17:00:20 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-04 17:00:20 (GMT)
commit2e733c9625abf1912845d37e1eceeb3cc2873afa (patch)
tree826e5d5a48c46e98e7b4afec2855b7a930e27214 /Lib
parent766f5d9d736ae37167534fbb2484b6dbcb70bd34 (diff)
downloadcpython-2e733c9625abf1912845d37e1eceeb3cc2873afa.zip
cpython-2e733c9625abf1912845d37e1eceeb3cc2873afa.tar.gz
cpython-2e733c9625abf1912845d37e1eceeb3cc2873afa.tar.bz2
Issue #9118: help(None) will now return NoneType doc instead of
starting interactive help.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 2722a75..95eb318 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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()