From: Alexander Belopolsky Date: Tue, 11 Jan 2011 15:35:23 +0000 (+0000) Subject: Merged revisions 82547 via svnmerge from X-Git-Tag: v2.7.2rc1~376 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d501dde89d1ced7c5a96c727511b94d1b8d3a45c;p=thirdparty%2FPython%2Fcpython.git Merged revisions 82547 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82547 | alexander.belopolsky | 2010-07-04 13:00:20 -0400 (Sun, 04 Jul 2010) | 3 lines 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 c672cc33c364..90fa1b364ba6 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1718,8 +1718,9 @@ class Helper: return '' return '' - 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()