This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients belopolsky, jackdied, terry.reedy
Date 2010-07-04.03:55:12
SpamBayes Score 0.00027945737
Marked as misclassified No
Message-id <1278215714.46.0.106798732762.issue9118@psf.upfronthosting.co.za>
In-reply-to
Content
I agree that help(None) should return help on None but suggest a change to the patch.

I understand that the point of changing
-    def __call__(self, request=None):
to the somewhat opaque
+    def __call__(self, *args):
+        try:
+            request, = args
+        except ValueError:
is to make help() work the same as now without defaulting request to None. However, I believe that it will change help(1,2) to being the same as help() instead raising TypeError. I do not think that that API change is desirable. This can be avoided by instead creating a private sentinel. The alternate replacement would be

+    __GoInteractive = object()
+    def __call__(self, request=__GoInteractive):
+        if request is not __GoInteractive:
-        if request is not None:

with the rest of code the unchanged.
History
Date User Action Args
2010-07-04 03:55:14terry.reedysetrecipients: + terry.reedy, belopolsky, jackdied
2010-07-04 03:55:14terry.reedysetmessageid: <1278215714.46.0.106798732762.issue9118@psf.upfronthosting.co.za>
2010-07-04 03:55:13terry.reedylinkissue9118 messages
2010-07-04 03:55:12terry.reedycreate