Table of Contents

Class: Stack em.py

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

Methods   
__getitem__
__init__
__len__
__nonzero__
clone
pop
purge
push
top
  __getitem__ 
__getitem__ ( self,  index )

  __init__ 
__init__ ( self,  seq=None )

  __len__ 
__len__ ( self )

  __nonzero__ 
__nonzero__ ( self )

  clone 
clone ( self )

Create a duplicate of this stack.

  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 Fri Oct 18 20:03:43 2002 by HappyDoc version 2.0.1