I just installed the latest version of mock (0.4.0) under both Python 2.6
and 2.7 (svn trunk).  In both cases pydoc fails to find anything:

    ~% pydoc2.6 mock
    no Python documentation found for 'mock'

    ~% pydoc2.7 mock
    no Python documentation found for 'mock'

but this works from the interpreter prompt:

    import mock
    help(mock)

Is mock somehow "special" or am I expecting too much from pydoc?

Using Python 2.4 I get more troubling output:

    Traceback (most recent call last):
      File "/opt/app/bin/pydoc", line 5, in ?
        pydoc.cli()
      File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 2243, 
in cli    help.help(arg)
      File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 1697, 
in help
        elif request: doc(request, 'Help on %s:')
      File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 1483, 
in doc    pager(title % desc + '\n\n' + text.document(object, name))
      File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 303, in 
document
        if inspect.ismodule(object): return self.docmodule(*args)
      File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 1074, 
in docmodule
        contents = [self.formattree(
      File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/inspect.py", line 583, 
in getclasstree
        for parent in c.__bases__:
    TypeError: iteration over non-sequence

but Python 2.4 is old enough I don't really expect anything to change here.

-- 
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to