Package epydoc :: Module apidoc :: Class RoutineDoc

[hide private]
[frames] | no frames]

# Class RoutineDoc

source code

API documentation information about a single routine.

Instance Methods | [hide private]

`bool`

is_detailed(self) Does this object deserve a box with extra details? | source code call graph

Call Graph

all_args(self) Returns: A list of the names of all arguments (positional, vararg, and keyword), in order. | source code call graph

Call Graph

Inherited from `ValueDoc`: `__getstate__`, `__repr__`, `__setstate__`, `apidoc_links` Inherited from `APIDoc`: `__cmp__`, `__hash__`, `__init__`, `__setattr__`, `__str__`, `merge_and_overwrite`, `pp`, `specialize_to` Inherited from `APIDoc` (private): `_debug_setattr` Inherited from `object`: `__delattr__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`
Value Representation
Inherited from `ValueDoc`: `pyval_repr`, `summary_pyval_repr`

Class Variables | [hide private]

Value Representation
Inherited from `ValueDoc`: `REPR_LINELEN`, `REPR_MAXLINES`, `REPR_MIN_SCORE`, `SUMMARY_REPR_LINELEN`

Instance Variables | [hide private]

`str` | callgraph_uid = `None` DotGraph.uid of the call graph for the function.
Inherited from `ValueDoc`: `canonical_name`, `toktree`
Signature
`list` | posargs = `_Sentinel('UNKNOWN')` The names of the routine's positional arguments.
`list` of `ValueDoc` or `None` | posarg_defaults = `_Sentinel('UNKNOWN')` API documentation for the positional arguments' default values.
`string` or `None` | vararg = `_Sentinel('UNKNOWN')` The name of the routine's vararg argument, or `None` if it has no vararg argument.
`string` or `None` | kwarg = `_Sentinel('UNKNOWN')` The name of the routine's keyword argument, or `None` if it has no keyword argument.
`int` | lineno = `_Sentinel('UNKNOWN')` The line number of the first line of the function's signature.
Decorators
`list` of `string` | decorators = `_Sentinel('UNKNOWN')` A list of names of decorators that were applied to this routine, in the order that they are listed in the source code.
Information Extracted from Docstrings
`list` | arg_descrs = `_Sentinel('UNKNOWN')` A list of descriptions of the routine's arguments.
`dict` from `string` to ParsedDocstring | arg_types = `_Sentinel('UNKNOWN')` Descriptions of the expected types for the routine's arguments, encoded as a dictionary mapping from argument names to type descriptions.
ParsedDocstring | return_descr = `_Sentinel('UNKNOWN')` A description of the value returned by this routine.
ParsedDocstring | return_type = `_Sentinel('UNKNOWN')` A description of expected type for the value returned by this routine.
`list` | exception_descrs = `_Sentinel('UNKNOWN')` A list of descriptions of exceptions that the routine might raise.
Inherited from `APIDoc`: `descr`, `extra_docstring_fields`, `metadata`, `other_docs`, `summary`
Value Representation
Inherited from `ValueDoc`: `parse_repr`, `pyval`
Context
Inherited from `ValueDoc`: `defining_module`
Information about Imported Variables
Inherited from `ValueDoc`: `proxy_for`
Docstrings
Inherited from `APIDoc`: `docstring`, `docstring_lineno`
Source Information
Inherited from `APIDoc`: `docs_extracted_by`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### is_detailed(self)

source code
call graph

Call Graph

Does this object deserve a box with extra details?

Returns: `bool`
  True if the object needs extra details, else False.
Overrides: APIDoc.is_detailed
  (inherited documentation)

### all_args(self)

source code
call graph

Call Graph

Returns:
  A list of the names of all arguments (positional, vararg, and keyword), in order. If a positional argument consists of a tuple of names, then that tuple will be flattened.

Instance Variable Details | [hide private]

### posargs

The names of the routine's positional arguments. If an argument list contains "unpacking" arguments, then their names will be specified using nested lists. E.g., if a function's argument list is `((x1,y1), (x2,y2))`, then posargs will be `[['x1','y1'], ['x2','y2']]`.

Type:
  `list`

Value:

      _Sentinel('UNKNOWN')

### posarg_defaults

API documentation for the positional arguments' default values. This list has the same length as `posargs`, and each element of `posarg_defaults` describes the corresponding argument in `posargs`. For positional arguments with no default, `posargs_defaults` will contain None.

Type:
  `list` of `ValueDoc` or `None`

Value:

      _Sentinel('UNKNOWN')

### lineno

The line number of the first line of the function's signature. For Python functions, this is equal to `func.func_code.co_firstlineno`. The first line of a file is considered line 1.

Type:
  `int`

Value:

      _Sentinel('UNKNOWN')

### decorators

A list of names of decorators that were applied to this routine, in the order that they are listed in the source code. (I.e., in the reverse of the order that they were applied in.)

Type:
  `list` of `string`

Value:

      _Sentinel('UNKNOWN')

### arg_descrs

A list of descriptions of the routine's arguments. Each element of this list is a tuple `(args, descr)`, where `args` is a list of argument names; and `descr` is a ParsedDocstring describing the argument(s) specified by `arg`.

Type:
  `list`

Value:

      _Sentinel('UNKNOWN')

### exception_descrs

A list of descriptions of exceptions that the routine might raise. Each element of this list is a tuple `(exc, descr)`, where `exc` is a string contianing the exception name; and `descr` is a ParsedDocstring describing the circumstances under which the exception specified by `exc` is raised.

Type:
  `list`

Value:

      _Sentinel('UNKNOWN')