A simple stack that behaves as a sequence (with 0 being the top
of the stack, not the bottom).
Methods
|
|
|
|
__getitem__
|
__getitem__ ( self, index )
|
|
__init__
|
__init__ ( self, seq=None )
|
|
__len__
|
__len__ ( self )
|
|
__nonzero__
|
__nonzero__ ( self )
|
|
__repr__
|
__repr__ ( self )
|
|
clone
|
clone ( self )
Create a duplicate of this stack.
|
|
filter
|
filter ( self, function )
Filter the elements of the stack through the function.
|
|
pop
|
pop ( self )
Pop the top element off the stack and return it.
Exceptions
|
|
StackUnderflowError, "stack is empty for pop"
|
|
|
purge
|
purge ( self )
Purge the stack.
|
|
push
|
push ( self, object )
Push an element onto the top of the stack.
|
|
top
|
top ( self )
Access the top element on the stack.
Exceptions
|
|
StackUnderflowError, "stack is empty for top"
|
|