Terry J. Reedy <tjre...@udel.edu> added the comment:

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.

----------
nosy: +tjreedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9118>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to