willzh 发表于 2013-2-7 15:16:32

Epydoc

http://epydoc.sourceforge.net/


Epydoc is a tool for
generating API documentation for Python modules, based on their
docstrings.


A lightweight markup language called epytext
can be used to format docstrings, and
to add information about specific fields, such as parameters and
instance variables.Epydoc also understands docstrings written in
reStructuredText
,
Javadoc, and plaintext.


example:
def x_intercept(m, b):    """    Return the x intercept of the line M{y=m*x+b}.The X{x intercept}    of a line is the point at which it crosses the x axis (M{y=0}).    This function can be used in conjuction with L{z_transform} to    find an arbitrary function's zeros.    @typem: number    @param m: The slope of the line.    @typeb: number    @param b: The y intercept of the line.The X{y intercept} of a            line is the point at which it crosses the y axis (M{x=0}).    @rtype:   number    @return:the x intercept of the line M{y=m*x+b}.    """    return -b/m


# epydoc x_intercept.py
页: [1]
查看完整版本: Epydoc