Module parser :: Class Stack
[show private | hide private]
[frames | no frames]

Class Stack


A simple class to implement stacks
Method Summary
  __init__(self, start)
Reverse initial stack objects
  __add__(self, other)
  __cmp__(self, other)
  __getattr__(self, name)
  __getitem__(self, offset)
  __getslice__(self, low, high)
  __len__(self)
  __mul__(self, reps)
  __repr__(self)
  empty(self)
Tests if stack is empty
  pop(self)
  popall(self)
Empties stack
  push(self, object)
  top(self)
Returns top of stack (not poping it)

Method Details

__init__(self, start=[])
(Constructor)

Reverse initial stack objects

empty(self)

Tests if stack is empty

popall(self)

Empties stack

top(self)

Returns top of stack (not poping it)

Generated by Epydoc 2.0 on Sun Nov 16 11:16:30 2003 http://epydoc.sf.net