Table of Contents

Class: Stack em.py

A simple stack that behaves as a sequence (with 0 being the top of the stack, not the bottom).

Methods   
__getitem__
__init__
__len__
__nonzero__
__repr__
clone
filter
pop
purge
push
top
  __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"

Table of Contents

This document was automatically generated on Mon Oct 27 01:29:13 2003 by HappyDoc version 2.1