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

Module tree

source code

Base class to represent a tree structure.

:copyright: 2000-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

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

post_order_list(node, filter_func=<function no_filter at 0x407fdaac>)

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=<function no_filter at 0x407fdaac>)

source code 

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