From 2e733c9625abf1912845d37e1eceeb3cc2873afa Mon Sep 17 00:00:00 2001 From: Alexander Belopolsky Date: Sun, 4 Jul 2010 17:00:20 +0000 Subject: [PATCH] Issue #9118: help(None) will now return NoneType doc instead of starting interactive help. --- Lib/pydoc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 2722a753fe2..95eb3183b78 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()