Fields are used to describe specific properties of a documented object. For example, fields can be used to define the parameters and return value of a function; the instance variables of a class; and the author of a module. Each field consists of a tag, an optional argument, and a body.
Each docstring markup langauge marks fields differently. The following table shows the basic fields syntax for each markup language. For more information, see the definition of field syntax for each markup language.
| Epytext | ReStructuredText | Javadoc | 
|---|---|---|
| @tag: body...@tag arg: body... | :tag: body...:tag arg: body... | @tag body...@tag arg body... | 
| Definition of epytext fields | Definition of ReStructuredText fields | Definition of Javadoc fields | 
The following table lists the fields that epydoc currently recognizes. Field tags are written using epytext markup; if you are using a different markup language, then you should adjust the markup accordingly.
| Functions and Methods (function or method docstrings) | |
|---|---|
| @param p:... | A description of the parameter pfor a
    function or method. | 
| @type p:... | The expected type for the parameter p. | 
| @return:... | The return value for a function or method. | 
| @rtype:... | The type of the return value for a function or method. | 
| @keyword p:... | A description of the keyword parameter p. | 
| @raise e:... | A description of the circumstances under which a function or
    method raises exception e. | 
| Variables (module or class docstrings) | |
| @ivar v:... | A description of the class instance variable v. | 
| @cvar v:... | A description of the static class variable v. | 
| @var v:... | A description of the module variable v. | 
| @type v:... | The type of the variable v. | 
| Properties (property docstrings) | |
| @type:... | The type of the property. | 
| Grouping and Sorting (module, class, function, or method docstrings) | |
| @group g: c1,...,cn | Organizes a set of related children of a module or class into a group. gis the name of the group; andc1,...,cnare the names
    of the children in the group.  To define multiple groups, use
    multiplegroupfields. | 
| @sort: c1,...,cn | Specifies the sort order for the children of a module or class. c1,...,cnare the names
    of the children, in the order in which they should appear.  Any
    children that are not included in this list will appear after
    the children from this list, in alphabetical order. | 
| Related Topics | |
| @see:... | A description of a related topic. seefields
    typically use documentation crossreference links or external
    hyperlinks that link to the related topic. | 
| Notes and Warnings | |
| @note:... | A note about an object.  Multiple notefields may be used to list separate
    notes. | 
| @attention:... | An important note about an object.  Multiple attentionfields may be used to list separate
    notes. | 
| @bug:... | A description of a bug in an object.
    Multiple bugfields may be used to report separate
    bugs. | 
| @warning:... | A warning about an object.  Multiple warningfields may be used to report separate
    warnings. | 
| Status | |
| @version:... | The current version of an object. | 
| @todo [ver]:... | A planned
  change to an object.  If the optional argument veris given, then it specifies the version for which the change will be
  made.  Multipletodofields may be used if multiple
  changes are planned. | 
| @depreciated:... | Indicates that an object is depreciated. The body of the field describe the reason why the object is depreciated. | 
| @since:... | The date or version when an object was first introduced. | 
| @status:... | The current status of an object. | 
| Formal Conditions | |
| @requires:... | A requirement for using an object.  Multiple requiresfields may be used if an object has multiple
    requirements. | 
| @precondition:... | A condition that must be true before an object is used.  Multiple preconditionfields may be used if an object has
    multiple preconditions. | 
| @postcondition:... | A condition that is guaranteed to be true after an object is used.
    Multiple postconditionfields may be used if an
    object has multiple postconditions. | 
| @invariant:... | A condition which should always be true for an object.  Multiple invariantfields may be used if an object has
    multiple invariants. | 
| Bibliographic Information | |
| @author:... | The author(s) of an
    object.  Multiple authorfields may be used if an object has multiple authors. | 
| @organiation:... | The organization that created or maintains an object. | 
| @copyright:... | The copyright information for an object. | 
| @license:... | The licensing information for an object. | 
| @contact:... | Contact information
    for the author or maintainer of a module, class, function, or
    method.  Multiple contactfields may be used if an
    object has multiple contacts. | 
| Summarization | |
| @summary:... | A summary description for an object. This description overrides the default summary (which is constructed from the first sentence of the object's description). | 
 @param fields should be used to document any
explicit parameter (including the keyword parameter).
@keyword fields should only be used for non-explicit
keyword parameters: 
defplant(seed, *tools, **options):"""@param seed:The seed that should be planted.@param tools:Tools that should be used to plant the seed.@param options:Any extra options for the planting.@keyword dig_deep:Plant the seed deep under ground.@keyword soak:Soak the seed before planting it. """ [...]
 For the @group and @sort tags,
asterisks (*) can be used to specify multiple children at
once.  An asterisk in a child name will match any substring: 
classwidget(size, weight, age):"""@group Tools:zip, zap, *_tool@group Accessors:get_*@sort:get_*, set_*, unpack_*, cut """ [...]
 Since the @type field allows for arbitrary text,
it does not automatically create a crossreference link to the
specified type, and is not written in fixed-width font by default.  If
you want to create a crossreference link to the type, or to write the
type in a fixed-width font, then you must use inline markup: 
defponder(person, time):"""@param person:Who should think.@type person:L{Person} or L{Animal}@param time:How long they should think.@type time:C{int} or C{float} """ [...]
Several fields have "synonyms," or alternate tags. The following table lists all field synonyms. Field tags are written using epytext markup; if you are using a different markup language, then you should adjust the markup accordingly.
| 
 | 
 | 
 New fields can be defined for the docstrings in a module with the
special module-level variable "__extra_epydoc_fields__".
This variable should contain a list of field specifications, where
each field specification is one of the following: 
(tag, label), where tag is
  the field's tag, and label is its label.
  
  (tag, singular, plural), where
  tag is the field's tag, singular is the
  label that is used when the field has one entry, and
  plural is the label that is used when the field has
  multiple entries.  The following example illustrates how the special variable
"__extra_epydoc_fields__" can be used: 
| Docstring Input | Rendered Output | 
|---|---|
| 
__extra_epydoc_fields__ = [
    ('corpus', 'Corpus', 'Corpora')]
 | Corpora: 
 | 
 New fields can also be defined for an individual docstring, using
the special @newfield field.  In particular,
"@newfield tag: label [, plural]" will
define a new field, whose tag is tag; and which is
labeled in output documentation as label.  The
optional argument plural specifies the label that
should be used if the field has multiple entries. 
For the most part, fields are treated identically, regardless of what markup language is used to encode them. However, there are a few minor differences, which are intended to accomodate existing standards for each markup language. In particular:
@see fields. For more information about these differences, read the subsections below.
 In ReStructuredText, a single field can be used to encode the
documentation for a group of related items.  For example, a single
:Parameters: field is often used to describe all of the
parameters for a function or method: 
deffox_speed(size, weight, age):""" Return the maximum speed for a fox.[...]:Parameters:- `size`: The size of the fox (in meters) - `weight`: The weight of the fox (in stones) - `age`: The age of the fox (in years) """
These types of combined fields are called consolidated fields, and epydoc automatically divides them into their constituant basic fields. The following consolidated fields are currently supported by epydoc:
| 
 | 
 | 
 Consolidated fields are required to contain a single list, where
each list item begins with a paragraph that begins with an interpreted
text string (`...`).  
 For compatibility with Javadoc, every @see field is
assumed to contain a single crossreference link, unless its body
is quoted, or it start with an HTML tag.  See the
Javadoc reference manual for more information about how the
@see field is encoded in Javadoc. 
Because Javadoc does not mark end of the optional argument, field arguments must contain exactly one word. Thus, multi-word arguments are not available in Javadoc. In particular, all group names must be single words.
| [Epydoc] | [Installing] | [Using] | [Epytext] | [Author] |  |