[Python-bugs-list] [ python-Bugs-411060 ] pydoc helpe(help) fails
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 13 Apr 2001 05:47:58 -0700
Bugs item #411060, was updated on 2001-03-24 08:21
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=411060&group_id=5470
Category: Python Library
Group: None
>Status: Closed
Priority: 5
Submitted By: Emile van Sebille (evansebille)
Assigned to: Ka-Ping Yee (ping)
Summary: pydoc helpe(help) fails
Initial Comment:
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! ;-)
----------------------------------------------------------------------
>Comment By: Ka-Ping Yee (ping)
Date: 2001-04-13 05:47
Message:
Logged In: YES
user_id=45338
Fixed in the new version of pydoc.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=411060&group_id=5470