Documenting data members

Discussion in 'Python' started by Frans Englich, Jan 8, 2005.

  1. 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
    Frans Englich, Jan 8, 2005
    #1
    1. Advertising

  2. In <>, Frans Englich
    wrote:

    > 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/
    Marc 'BlackJack' Rintsch, Jan 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JFCM
    Replies:
    4
    Views:
    5,724
  2. CoolPint
    Replies:
    8
    Views:
    957
    Jeff Schwab
    Dec 14, 2003
  3. Dave
    Replies:
    3
    Views:
    360
    tom_usenet
    Aug 10, 2004
  4. Terry Hancock

    Re: Epydoc - Documenting class members?

    Terry Hancock, Sep 3, 2005, in forum: Python
    Replies:
    0
    Views:
    434
    Terry Hancock
    Sep 3, 2005
  5. =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?=

    Documenting members

    =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?=, Sep 29, 2005, in forum: Python
    Replies:
    1
    Views:
    255
    Miki Tebeka
    Sep 29, 2005
Loading...

Share This Page