penman.tree

Definitions of tree structures.

class penman.tree.Tree(node, metadata=None)[source]

A tree structure.

A tree is essentially a node that contains other nodes, but this Tree class is useful to contain any metadata and to provide tree-based methods.

nodes()[source]

Return the nodes in the tree as a flat list.

penman.tree.is_atomic(x)[source]

Return True if x is a valid atomic value.