Package epydoc :: Module apidoc :: Class ValueDoc
[hide private]
[frames] | no frames]

Class ValueDoc
source code


API documentation information about a single Python value.

Instance Methods [hide private]
  __repr__(self)
  pyval_repr(self)
Return a string representation of this value based on its pyval; or UNKNOWN if we don't succeed.
  apidoc_links(self, **filters)
Return a list of all APIDocs that are directly linked from this APIDoc (i.e., are contained or pointed to by one or more of this APIDoc's attributes.)

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__


Class Variables [hide private]

Inherited from object: __class__


Instance Variables [hide private]
canonical_name A dotted name that serves as a unique identifier for this ValueDoc's value.
toktree This is currently used to extract values from __all__, etc, in the docparser module; maybe I should specialize process_assignment and extract it there? Although, for __all__, it's not clear where I'd put the value, since I just use it to set private/public/imported attribs on other vars (that might not exist yet at the time.)
    Value Representation
pyval A pointer to the actual Python object described by this ValueDoc.
parse_repr A text representation of this value, extracted from parsing its source code.
    Context
defining_module The documentation for the module that defines this value.
    Information about Imported Variables
proxy_for If proxy_for is not None, then this value was imported from another file.
    Docstrings

Inherited from APIDoc: docstring, docstring_lineno

    Information Extracted from Docstrings

Inherited from APIDoc: descr, extra_docstring_fields, metadata, summary

    Source Information

Inherited from APIDoc: docs_extracted_by


Method Details [hide private]

__repr__(self)
(Representation operator)

source code 
call graph 
Overrides: APIDoc.__repr__

pyval_repr(self)

source code 
call graph 
Return a string representation of this value based on its pyval; or UNKNOWN if we don't succeed. This should probably eventually be replaced by more of a safe-repr variant.

apidoc_links(self, **filters)

source code 
call graph 

Return a list of all APIDocs that are directly linked from this APIDoc (i.e., are contained or pointed to by one or more of this APIDoc's attributes.)

Keyword argument filters can be used to selectively exclude certain categories of attribute value. For example, using includes=False will exclude variables that were imported from other modules; and subclasses=False will exclude subclasses. The filter categories currently supported by epydoc are:
  • imports: Imported variables.
  • packages: Containing packages for modules.
  • submodules: Contained submodules for packages.
  • bases: Bases for classes.
  • subclasses: Subclasses for classes.
  • variables: All variables.
  • private: Private variables.
Overrides: APIDoc.apidoc_links
(inherited documentation)

Instance Variable Details [hide private]

canonical_name

A dotted name that serves as a unique identifier for this ValueDoc's value. If the value can be reached using a single sequence of identifiers (given the appropriate imports), then that sequence of identifiers is used as its canonical name. If the value can be reached by multiple sequences of identifiers (i.e., if it has multiple aliases), then one of those sequences of identifiers is used. If the value cannot be reached by any sequence of identifiers (e.g., if it was used as a base class but then its variable was deleted), then its canonical name will start with '??'. If necessary, a dash followed by a number will be appended to the end of a non-reachable identifier to make its canonical name unique.

When possible, canonical names are chosen when new ValueDocs are created. However, this is sometimes not possible. If a canonical name can not be chosen when the ValueDoc is created, then one will be assigned by assign_canonical_names().
Type:
DottedName
Value:
epydoc.apidoc.UNKNOWN
      

pyval

A pointer to the actual Python object described by this ValueDoc. This is used to display the value (e.g., when describing a variable.) Use pyval_repr() to generate a plaintext string representation of this value.
Type:
Python object
Value:
epydoc.apidoc.UNKNOWN
      

parse_repr

A text representation of this value, extracted from parsing its source code. This representation may not accurately reflect the actual value (e.g., if the value was modified after the initial assignment).
Type:
unicode
Value:
_Sentinel('UNKNOWN')                                                   
      

defining_module

The documentation for the module that defines this value. This is used, e.g., to lookup the appropriate markup language for docstrings. For a ModuleDoc, defining_module should be self.
Type:
ModuleDoc
Value:
epydoc.apidoc.UNKNOWN
      

proxy_for

If proxy_for is not None, then this value was imported from another file. proxy_for is the dotted name of the variable that this value was imported from. If that variable is documented, then its value may contain more complete API documentation about this value. The proxy_for attribute is used by the source code parser to link imported values to their source values (in particular, for base classes). When possible, these proxy ValueDocs are replaced by the imported value's ValueDoc by link_imports().
Type:
DottedName
Value:
None                                                                  
      

toktree

This is currently used to extract values from __all__, etc, in the docparser module; maybe I should specialize process_assignment and extract it there? Although, for __all__, it's not clear where I'd put the value, since I just use it to set private/public/imported attribs on other vars (that might not exist yet at the time.)
Value:
epydoc.apidoc.UNKNOWN