]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 82547 via svnmerge from
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 11 Jan 2011 15:23:22 +0000 (15:23 +0000)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 11 Jan 2011 15:23:22 +0000 (15:23 +0000)
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.
........

Lib/pydoc.py

index 1afc5f70ed84a601f2dd04c10babe847cfbd3327..916076a6c2de5a26afcc37d64608114b0ae98a13 100755 (executable)
@@ -1706,8 +1706,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()