Documenting data members

F

Frans Englich

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
 
M

Marc 'BlackJack' Rintsch

Frans Englich said:
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:

I'm using epydoc_ for my documentation and there the module level and
class level variables are documented in the module/class docstring with
special markup.
"""
A dictionary of the namespaces.
"""
xmlns = {
...
}

Will become:

""" (Module description)

:var xmlns: A dictionary of the namespaces.
"""

Ciao,
Marc 'BlackJack' Rintsch

... _epydoc: http://epydoc.sourceforge.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top