Documenting data members

Frans Englich frans.englich at telia.com
Sat Jan 8 16:22:43 EST 2005


Hello,

I have a custom module which among others contains a dictionary, acting as a 
"constant". I want to document it, but no matter what I do, it doesn't show 
up in `pydoc`. For example, the following doesn't work:

"""
A dictionary of the namespaces.
"""
xmlns = {
...
}

or

xmlns = {
"""
A dictionary of the namespaces.
"""
...
}

Bottom line: how do I document data members?

I also have another documentation question:

In a module which I install, the file starts with a comment containing a 
license header, to then be followed by a Python documentation string("""this 
module ..."""). The problem is that in pydoc, I get the uninteresting license 
header as documentation, instead of the doc string. I want to have the 
license header at the top.
Is this somehow fixable? That the doc string, instead of the license header, 
shows up in pydoc despite the latter being first in the file?


Cheers,

		Frans





More information about the Python-list mailing list