epydoc.objdoc.Param

Package epydoc :: Module objdoc :: Class Param |
[show private | hide private]
[frames | no frames]

## Class Param

The documentation for a function parameter. This documentation consists of the following fields:

- name: The name of the parameter
- descr: A description of the parameter
- type: A description of the parameter's type
- default: The parameter's default value

`Param`s are used by `FuncDoc` to document parameters.

Method Summary
| ``__init__`(self, name, descr, type, default)` Construct the documentation for a parameter.
| `__repr__(self)`
`string` or `None` | ``default`(self)` Return a string representation of the parameter's default value; or `None` if it has no default value.
`markup.ParsedDocstring` | ``descr`(self)` Return a description of this parameter.
`string` | ``name`(self)` Return the name of this parameter.
`None` | ``set_default`(self, default)` Set this parameter's default value.
`None` | ``set_descr`(self, descr)` Set this parameter's description.
`None` | ``set_type`(self, type)` Set this parameter's type.
`markup.ParsedDocstring` | ``type`(self)` Return a description of this parameter's type.
Shared Parameter Lists
`None` or `list` of `Param` | ``shared_descr_params`(self)` Return a list of `Param`s that share the description given by this parameter.
`None` or `Param` | ``listed_under`(self)` Return the parameter that this `Param` is listed under, if any.
`None` | ``set_shared_descr_params`(self, shared_descr_params)` Register a list of `Param`s that share the description given by this parameter.
| ``remove_shared_descr_param`(self, param)` Remove a parameter from the list of `Param`s that share the description given by this parameter.

Method Details

    ### shared_descr_params(self) Returns: A list of `Param`s that share the description given by this parameter. This is used in cases where multiple parameters are descrubed in one `@param` field, such as:
           @param *varargs, **kwargs: extra args for f.
In this case, the description will be added to `varargs`'s `Param`; and `vararg`'s `Param` will list `kwargs` in its `shared_descr_params()` list. For parameters described by normal (single-parameter) `@param` fields, `shared_descr_params` will return `None`. (type=`None` or `list` of `Param`)

### listed_under(self) Returns: The parameter that this `Param` is listed under, if any. This parameter is listed under parameter `p` if it contained in `p.shared_descr_params()`. (type=`None` or `Param`) See Also: `shared_descr_params`

### set_shared_descr_params(self, shared_descr_params) Register a list of `Param`s that share the description given by this parameter. Parameters: `shared_descr_params` - The `Param`s that share the description given by this parameter (type=`list` of `Param`) Returns: `None` See Also: `shared_descr_params`

### remove_shared_descr_param(self, param) Remove a parameter from the list of `Param`s that share the description given by this parameter. Parameters: `param` (type=`Param`) See Also: `shared_descr_params`

### __init__(self, name, descr=None, type=None, default=None) (Constructor) Construct the documentation for a parameter. Parameters: `name` - The name of the parameter. (type=`string`) `descr` - A description of this parameter. (type=`markup.ParsedDocstring`) `type` - A description of this parameter's type. (type=`markup.ParsedDocstring`) `default` - A string representation of the parameter's default value; or `None` if it has no default value. (type=`string` or `None`)

### default(self) Returns: A string representation of the parameter's default value; or `None` if it has no default value. (type=`string` or `None`)

### descr(self) Returns: A description of this parameter. (type=`markup.ParsedDocstring`)

### name(self) Returns: The name of this parameter. (type=`string`)

### set_default(self, default) Set this parameter's default value. Parameters: `default` - A string representation of the parameter's default value; or `None` if it has no default value. (type=`string` or `None`) Returns: `None`

### set_descr(self, descr) Set this parameter's description. Parameters: `descr` - The new description of this parameter. (type=`markup.ParsedDocstring`) Returns: `None`

### set_type(self, type) Set this parameter's type. Parameters: `type` - The new description of this parmeter's type. (type=`markup.ParsedDocstring`) Returns: `None`

### type(self) Returns: A description of this parameter's type. (type=`markup.ParsedDocstring`)

Generated by Epydoc 2.1 on Sat Mar 20 17:46:12 2004 | http://epydoc.sf.net