commit | 2e733c9625abf1912845d37e1eceeb3cc2873afa | [log] [tgz] |
---|---|---|
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Sun Jul 04 17:00:20 2010 +0000 |
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Sun Jul 04 17:00:20 2010 +0000 |
tree | 826e5d5a48c46e98e7b4afec2855b7a930e27214 | |
parent | 766f5d9d736ae37167534fbb2484b6dbcb70bd34 [diff] [blame] |
Issue #9118: help(None) will now return NoneType doc instead of starting interactive help.
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 @@ 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()