Package schrodinger :: Package job :: Module queue :: Class LinkedList
[hide private]
[frames] | no frames]

Class LinkedList

object --+
         |
        LinkedList
Known Subclasses:

A doubly linked list, providing constant time addition, size, and truth checks. It provides for constant time removal if you have the node object in hand. It provides for linear time iteration without copying while allowing removals or additions to the list during iteration.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__nonzero__(self)
 
__len__(self)
 
_iter_from(self, start, reverse=False)
Iterate over the list in some direction from some start point.
 
__iter__(self)
Iterate from head to tail over the list, yielding a (node, value) tuple for each element.
 
reverse_iter(self)
Iterate from tail to head over the list, yielding a (node, value) tuple for each element.
 
__getstate__(self)
 
__setstate__(self, state)
 
remove(self, node)
Remove a node from the list.
 
add(self, value)
Add a node to the list.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

_iter_from(self, start, reverse=False)

 

Iterate over the list in some direction from some start point. Common code from __iter__() and reverse_iter().