from pydoc import help
help(help)
-->
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "c:\python21\lib\pydoc.py", line 1147, in
__call__
doc(args[0])
File "c:\python21\lib\pydoc.py", line 1106, in doc
pager('Help on %s:\n\n' % desc + text.document
(thing))
File "c:\python21\lib\pydoc.py", line 196, in
document
return apply(self.docother, args)
File "c:\python21\lib\pydoc.py", line 895, in
docother
line = self.bold(name) + ' = ' + repr
File "c:\python21\lib\pydoc.py", line 700, in bold
return join(map(lambda ch: ch + '\b' + ch,
text), '')
TypeError: argument 2 to map() must be a sequence
object
---------------------------
by changing Helper in pydoc.py and wrapping calls in
try/except:
def __call__(self, *args):
try:
doc(args[0])
except:
print repr(self)
you get:
>>> help(help)
To get help on a Python object, call help(object).
To get help on a module or package, either import it
before calling
help(module) or call help('modulename').
>>>
This is obviously not the place to change it, but it
did help! ;-)
|