Package logilab :: Package common :: Module tree
[frames] | no frames]

Module tree

source code

Base class to represent a tree structure.

Classes
  NodeNotFound
raised when a node has not been found
  Node
a basic tree node, characterized by an id
  VNode
a visitable node...
  BinaryNode
a binary node (i.e.
  ListNode
Used to manipulate Nodes as Lists...
  PostfixedDepthFirstIterator
a postfixed depth first iterator, designed to be used with visitors...
  PrefixedDepthFirstIterator
a prefixed depth first iterator, designed to be used with visitors...
Functions
 
post_order_list(node, filter_func=no_filter)
create a list with tree nodes for which the <filter> function returned true...
source code
 
pre_order_list(node, filter_func=no_filter)
create a list with tree nodes for which the <filter> function returned true...
source code
Variables
  EX_SIBLING_NOT_FOUND = "No such sibling as '%s'"
  EX_CHILD_NOT_FOUND = "No such child as '%s'"
  EX_NODE_NOT_FOUND = "No such node as '%s'"
  list_class = UserList
Function Details

post_order_list(node, filter_func=no_filter)

source code 

create a list with tree nodes for which the <filter> function returned true
in a post order fashion

pre_order_list(node, filter_func=no_filter)

source code 

create a list with tree nodes for which the <filter> function returned true
in a pre order fashion