Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Documenting data members

Reply
Thread Tools

Documenting data members

 
 
Frans Englich
Guest
Posts: n/a
 
      01-08-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


 
Reply With Quote
 
 
 
 
Marc 'BlackJack' Rintsch
Guest
Posts: n/a
 
      01-08-2005
In <(E-Mail Removed)>, 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between static final members and final static members(if any)? JFCM Java 4 02-07-2006 11:32 AM
Documenting members =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= Python 1 09-29-2005 01:09 PM
Re: Epydoc - Documenting class members? Terry Hancock Python 0 09-03-2005 12:15 AM
Epydoc - Documenting class members? Miki Tebeka Python 1 08-31-2005 07:03 PM
Can nested class members access private members of nesting class? CoolPint C++ 8 12-14-2003 02:30 PM



Advertisments