Bugs item #1442012, was opened at 2006-03-02 21:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1442012&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Thomas Heller (theller) Assigned to: Nobody/Anonymous (nobody) Summary: Traceback in pydoc Initial Comment: On some objects I have, calling 'help(obj)' raises an exception. Python 2.4.2, Windows XP. This is the traceback, together with some info from pdb.pm(): >>> help(r) Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python24\lib\site.py", line 328, in __call__ return pydoc.help(*args, **kwds) File "c:\python24\lib\pydoc.py", line 1647, in __call__ self.help(request) File "c:\python24\lib\pydoc.py", line 1691, in help else: doc(request, 'Help on %s:') File "c:\python24\lib\pydoc.py", line 1475, in doc pager(title % desc + '\n\n' + text.document(object, name)) File "c:\python24\lib\pydoc.py", line 296, in document if inspect.isclass(object): return self.docclass(*args) File "c:\python24\lib\pydoc.py", line 1193, in docclass lambda t: t[1] == 'method') File "c:\python24\lib\pydoc.py", line 1143, in spill name, mod, object)) File "c:\python24\lib\pydoc.py", line 301, in document return self.docother(*args) File "c:\python24\lib\pydoc.py", line 1290, in docother chop = maxlen - len(line) TypeError: unsupported operand type(s) for -: '_compointer_meta' and 'int' >>> import pdb >>> pdb.pm() > c:\python24\lib\pydoc.py(1290)docother() -> chop = maxlen - len(line) (Pdb) args self = <pydoc.TextDoc instance at 0x00CC0DA0> object = <comtypes.named_property object at 0x00CA9390> name = Item mod = None maxlen = <class 'comtypes.POINTER(IROIList)'> doc = None (Pdb) where <stdin>(1)?() c:\python24\lib\site.py(328)__call__() -> return pydoc.help(*args, **kwds) c:\python24\lib\pydoc.py(1647)__call__() -> self.help(request) c:\python24\lib\pydoc.py(1691)help() -> else: doc(request, 'Help on %s:') c:\python24\lib\pydoc.py(1477)doc() -> print value c:\python24\lib\pydoc.py(299)document() -> pass c:\python24\lib\pydoc.py(1193)docclass() -> lambda t: t[1] == 'method') c:\python24\lib\pydoc.py(1143)spill() -> name, mod, object)) c:\python24\lib\pydoc.py(301)document() -> return self.docother(*args) > c:\python24\lib\pydoc.py(1290)docother() -> chop = maxlen - len(line) (Pdb) The problem seems to be that the TextDoc.docother method is called with unexpected arguments. The signature is docother(object, name, mod, maxlen, doc) but it is called with the object to document as the 'maxlen' parameter. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1442012&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com