(original) (raw)

Index: Lib/pydoc.py =================================================================== --- Lib/pydoc.py (revision 82412) +++ Lib/pydoc.py (working copy) @@ -1705,10 +1705,10 @@ return '' return '' - def __call__(self, request=None): - if request is not None: - self.help(request) - else: + def __call__(self, *args): + try: + request, = args + except ValueError: self.intro() self.interact() self.output.write(''' @@ -1717,6 +1717,8 @@ interpreter, you can type "help(object)". Executing "help('string')" has the same effect as typing a particular string at the help> prompt. ''') + else: + self.help(request) def interact(self): self.output.write('\n')