diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-07-04 17:00:20 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-07-04 17:00:20 (GMT) |
commit | 2e733c9625abf1912845d37e1eceeb3cc2873afa (patch) | |
tree | 826e5d5a48c46e98e7b4afec2855b7a930e27214 /Lib/pydoc.py | |
parent | 766f5d9d736ae37167534fbb2484b6dbcb70bd34 (diff) | |
download | cpython-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/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 5 |
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() |