From: Alexander Belopolsky Date: Sun, 4 Jul 2010 17:00:20 +0000 (+0000) Subject: Issue #9118: help(None) will now return NoneType doc instead of X-Git-Tag: v3.2a1~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e733c9625abf1912845d37e1eceeb3cc2873afa;p=thirdparty%2FPython%2Fcpython.git 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 2722a753fe27..95eb3183b785 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1705,8 +1705,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()