Documenting data members

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frans Englich

    #1

    Documenting data members


    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


  • Marc 'BlackJack' Rintsch

    #2
    Re: Documenting data members

    In <mailman.378.11 05218913.22381. python-list@python.org >, Frans Englich
    wrote:
    [color=blue]
    > 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:[/color]

    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.
    [color=blue]
    > """
    > A dictionary of the namespaces.
    > """
    > xmlns = {
    > ...
    > }[/color]

    Will become:

    """ (Module description)

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

    Ciao,
    Marc 'BlackJack' Rintsch

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

    Comment

    Working...