Package logilab :: Package common :: Module tree :: Class ListNode

[frames] | no frames]

# Class ListNode

source code

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

    Used to manipulate Nodes as Lists

Instance Methods

__init__(self) x.__init__(...) initializes x; see help(type(x)) for signature | 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

remove(self, child) add a node to children | source code

pop(self, index) add a node to children | source code

__iter__(self) | 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 `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
  (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: Node.append

### insert(self, index, child)

source code

    add a node to children

Overrides: Node.insert

### remove(self, child)

source code

    add a node to children

Overrides: Node.remove

### __iter__(self)

source code

Overrides: Node.__iter__