epydoc.markup.epytext.Element

Package epydoc :: Package markup :: Module epytext :: Class Element |
[hide private]
[frames] | no frames]

# Class Element

source code

A very simple DOM-like representation for parsed epytext documents. Each epytext document is encoded as a tree whose nodes are Element objects, and whose leaves are `string`s. Each node is marked by a tag and zero or more attributes. Each attribute is a mapping from a string key to a string value.

Instance Methods | [hide private]
__init__(self, tag, *children, **attribs) | source code call graph
Call Graph
__str__(self) Return a string representation of this element, using XML notation. | source code
__repr__(self) | source code

Instance Variables | [hide private]
`string` | tag A string tag indicating the type of this element.
`list` of (`string` or `Element`) | children A list of the children of this element.
`dict` from `string` to `string` | attribs A dictionary mapping attribute names to attribute values for this element.

Method Details | [hide private]

### __str__(self) (Informal representation operator) | source code
Return a string representation of this element, using XML notation. Bug: Doesn't escape '<' or '&' or '>'.