Home | Trees | Index | Help |
|
---|
Package epydoc :: Module objdoc |
|
Support for ObjDoc
s, which encode the information about a
Python object that is necessary to create its documentation.
ObjDoc
s are created and managed by the DocMap
class, which acts like a dictionary from UID
s to
ObjDoc
s.
Textual documentation entries (e.g., module descriptions, method
descriptions, variable types, see-also entries) are encoded as ParsedDocstrings
.
UID
class. These identifiers are also used
by the Link
class to implement crossreferencing between
ObjDoc
s.
Classes | |
---|---|
ClassDoc |
The documentation for a class. |
DocField |
A generic docstring field. |
DocMap |
A dictionary mapping each object to the object's documentation. |
FuncDoc |
The documentation for a function. |
ModuleDoc |
The documentation for a module or package. |
ObjDoc |
A base class for encoding the information about a Python object that is necessary to create its documentation. |
Param |
The documentation for a function parameter. |
PropertyDoc |
The documentation for a property. |
Raise |
The documentation for the raising of an exception. |
Var |
The documentation for a variable. |
Function Summary | |
---|---|
report_param_mismatches(docmap)
| |
None
|
Change the default value for __docformat__ to the given
value. |
Match data to pattern , with variable
extraction. | |
_descr_to_docfield(arg,
descr)
| |
list of string
|
Given a ParsedDocstring that contains a list of
identifiers, return a list of those identifiers. |
_dfs_bases(cls)
| |
list of class
|
Return a list of the base ancestors of cls , in the order that
they should be searched for attributes. |
(string, int) or (None, None)
|
Return the file name and line number of the docstring for the given object; or None if the docstring cannot be found. |
Recursively explore tree , and return an in-order list of
all leaves. | |
Get the documentation string for an object. | |
Find the value for a class's field by looking through its base order list, and using getattr to access the first base that contains the field. |
Variable Summary | |
---|---|
str |
DEFAULT_DOCFORMAT : The default value for __docformat__ , if it is not
specified by modules. |
tuple |
KNOWN_DOCFORMATS = ('plaintext', 'epytext', 'restructure...
|
SRE_Pattern |
_IDENTIFIER_LIST_REGEXP = ^[\w\.\*]+([\s,:;]\s*[\w\.\*]+...
|
tuple |
_KNOWN_FIELD_TAGS = ('var', 'variable', 'ivar', 'ivariab...
|
Function Details |
---|
set_default_docformat(new_format)Change the default value for__docformat__ to the given
value. The current default value for __docformat__ is
recorded in DEFAULT_DOCFORMAT .
|
_ast_match(pattern, data, vars=None, indent=0)Match pattern value may contain variables of the form
['varname'] which are allowed to match
anything. The value that is matched is returned as part of a dictionary
which maps 'varname' to the matched value. 'varname' is not required to be a string object, but
using strings makes patterns and the code which uses them more
readable.
|
_descr_to_identifiers(descr)Given aParsedDocstring that contains a list of
identifiers, return a list of those identifiers. This is used by fields
such as @group and @sort , which
expect lists of identifiers as their values. To extract the
identifiers, the docstring is first converted to plaintext, and then
split. The plaintext content of the docstring must be a a list of
identifiers, separated by spaces, commas, colons, or semicolons.
|
_find_base_order(cls)
|
_find_docstring(uid)
|
_flatten(tree)Recursively exploretree , and return an in-order list
of all leaves.
|
_getdoc(obj)Get the documentation string for an object. This function is similar toinspect.getdoc . In particular, it finds the minimum
indentation fromthe second line onwards, and removes that indentation
from each line. But it also checks to make sure that the docstring is
actually a string (since some programs put other data in the
docstrings).
|
_lookup_class_field(cls, field, base_order=None)Find the value for a class's field by looking through its base order list, and using getattr to access the first base that contains the field. Note that this is different from just usinggetattr
directly, since for methods it will return a method of the base class,
rather than a method of the given class. This is useful for
constructing UIDs for class methods.
|
Variable Details |
---|
KNOWN_DOCFORMATS
|
_IDENTIFIER_LIST_REGEXP
|
_KNOWN_FIELD_TAGS
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 20 17:46:19 2004 | http://epydoc.sf.net |