homepage

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 getopt fails
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: jhylton
Priority: normal Keywords:

Created on 2002年03月28日 20:03 by jhylton, last changed 2022年04月10日 16:05 by admin. This issue is now closed.

Messages (2)
msg10081 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002年03月28日 20:03
slothrop:~> pydoc getopt
Traceback (most recent call last):
 File "/usr/local/bin/pydoc", line 4, in ?
 pydoc.cli()
 File "/usr/local/lib/python2.3/pydoc.py", line 2077,
in cli
 doc(arg)
 File "/usr/local/lib/python2.3/pydoc.py", line 1341,
in doc
 pager(title % (desc + suffix) + '\n\n' +
text.document(thing, name))
 File "/usr/local/lib/python2.3/pydoc.py", line 267,
in document
 if inspect.ismodule(object): return
apply(self.docmodule, args)
 File "/usr/local/lib/python2.3/pydoc.py", line 961,
in docmodule
 contents.append(self.document(value, key, name))
 File "/usr/local/lib/python2.3/pydoc.py", line 268,
in document
 if inspect.isclass(object): return
apply(self.docclass, args)
 File "/usr/local/lib/python2.3/pydoc.py", line 1093,
in docclass
 lambda t: t[1] == 'method')
 File "/usr/local/lib/python2.3/pydoc.py", line 1035,
in spill
 name, mod, object))
 File "/usr/local/lib/python2.3/pydoc.py", line 269,
in document
 if inspect.isroutine(object): return
apply(self.docroutine, args)
 File "/usr/local/lib/python2.3/pydoc.py", line 1154,
in docroutine
 doc = getdoc(object) or ''
 File "/usr/local/lib/python2.3/pydoc.py", line 66, in
getdoc
 result = inspect.getdoc(object) or
inspect.getcomments(object)
 File "/usr/local/lib/python2.3/inspect.py", line 420,
in getcomments
 try: lines, lnum = findsource(object)
 File "/usr/local/lib/python2.3/inspect.py", line 384,
in findsource
 file = getsourcefile(object) or getfile(object)
 File "/usr/local/lib/python2.3/inspect.py", line 329,
in getsourcefile
 filename = getfile(object)
 File "/usr/local/lib/python2.3/inspect.py", line 309,
in getfile
 raise TypeError, 'arg is not a module, class,
method, ' \
TypeError: arg is not a module, class, method,
function, traceback, frame, or code object
msg10082 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002年04月01日 17:49
Logged In: YES 
user_id=31392
Fixed in rev 1.31 of inspect.py by catching TypeError in 
getcomments(). Good enough, I guess.
History
Date User Action Args
2022年04月10日 16:05:10adminsetgithub: 36349
2002年03月28日 20:03:20jhyltoncreate

AltStyle によって変換されたページ (->オリジナル) /