[Epydoc-devel] introspection misconception
Brought to you by:
edloper
From: <oti...@ya...> - 2008-03-28 15:34:17
|
Dear epydoc devels, thank you for maintaining epydoc, which is a software I depend on daily basis :-))) I'm running into a problem using epydoc with introspection, but I am not sure if this is a bug, a feature or a misconception on my part. If I have a python module organized as follows: foo/ foo/__init__.py foo/bar.py where __init__.py consists of the following two lines: from bar import FooBar del bar and bar.py of the following two lines: class FooBar(object): """Nice Class""" pass importing the above module in python shows: >>> import foo >>> dir(foo) ['FooBar', '__builtins__', '__doc__', '__file__', '__name__', '__path__'] which, as expected, shows the class 'FooBar' as the only non-private member of module 'foo' . If I now generate the API docs with epydoc using 'parse-only' I get documentation for: foo, foo.bar, foo.bar.FooBar whereas, using 'introspection-only' I was under the impression that I would get docs for foo, foo.FooBar. What happens instead is that for 'introspection-only', docs are generated for foo, foo.bar', foo.bar'.FooBar with a warning that a variable shadows the module 'bar'. What am I missing here? I thought introspection meant that epydoc is importing my module and introspecting it to find out all its members. But with introspection only, one would never get to "foo.bar", which is not available in the namespace of "foo". I am sorry if the question sounds odd, but that's probably because I did not understand how epydoc assigns names to objects. I'm attaching for convenience a tarball with the python modules and the docs generated by epydoc with parsing and introspection. thank you! tiziano ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping |