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.

classification
Title: pydoc helpe(help) fails
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ping Nosy List: evansebille, ping
Priority: normal Keywords:

Created on 2001-03-24 16:21 by evansebille, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Messages (2)
msg4039 - (view) Author: Emile van Sebille (evansebille) Date: 2001-03-24 16:21
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!  ;-)

msg4040 - (view) Author: Ka-Ping Yee (ping) * (Python committer) Date: 2001-04-13 12:47
Logged In: YES 
user_id=45338

Fixed in the new version of pydoc.
History
Date User Action Args
2022-04-10 16:03:53adminsetgithub: 34227
2001-03-24 16:21:42evansebillecreate