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

Class ListNode

source code

          object --+        
                   |        
                Node --+    
                       |    
          object --+   |    
                   |   |    
visitor.VisitedMixIn --+    
                       |    
                   VNode --+
                           |
              object --+   |
                       |   |
                    list --+
                           |
                          ListNode

Used to manipulate Nodes as Lists
    

Instance Methods
new list
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__iter__(self)
iter(x)
source code
 
__str__(self, indent=0)
str(x)
source code
 
append(self, child)
add a node to children
source code
 
insert(self, index, child)
add a node to children
source code
item
pop(self, index)
add a node to children
source code
 
remove(self, child)
add a node to children
source code

Inherited from Node: depth, depth_down, flatten, get_child_by_id, get_child_by_path, get_node_by_id, get_sibling, is_leaf, leaves, lineage, next_sibling, previous_sibling, replace, root, width

Inherited from visitor.VisitedMixIn: accept, get_visit_name, leave

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, count, extend, index, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables

Inherited from list: __hash__

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns: new list
Overrides: object.__init__
(inherited documentation)

__iter__(self)

source code 

iter(x)

Overrides: list.__iter__
(inherited documentation)

__str__(self, indent=0)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

append(self, child)

source code 
add a node to children

Overrides: list.append

insert(self, index, child)

source code 
add a node to children

Overrides: list.insert

pop(self, index)

source code 
add a node to children

Returns: item
Overrides: list.pop

remove(self, child)

source code 
add a node to children

Overrides: list.remove