I love epydoc, but I've found it difficult to get it to generate appropriate output for my project without patching it. In this particular instance, I was getting a lot of Class Variables whose values were showing up like:
<Number object at 0xb7a718b4>
when I used introspection only, and as the much more readable:
Number(default= 1.0, doc= "Scaling factor applied to all sub-patterns.")
when I used parsing only. But I can't use parse-only in general, because the docstrings for my classes (as reported in a previous bugreport or mail message) do not show up in that case.
What I have done for now is to patch the 3.0alpha3 version so that the html docwriter always favors the parsed representation for variable values (which seemed to work fine), even when introspected values are available.
Would it make sense to include a command-line switch to allow other users to do this? In very many cases the results are quite different, so I imagine that many users might want to choose one or the other, without giving up any of the other information available through introspection.
In case it helps, I've attached my patches to 3.0alpha3, though I think a command-line switch would be much more useful than the patches to docwriter/html.py. (The patches to docintrospector.py are for similar reasons mentioned earlier, to get the __doc__ string available for my custom objects even though there is no __doc__ variable in the source code...)
Log in to post a comment.