stack
index
c:\users\pattis\workspace\courselib\stack.py

 
Classes
       
builtins.object
Stack

 
class Stack(builtins.object)
    Implements a Stack data type: values are removed
  according to the Last-in-first-out (LIFO) rule.
 
  Methods defined here:
__add__(self, x)
Overload syntax: s = s + x is the same as s.add(x)
__bool__(self)
Determine the truth of a stack: non-empty stacks are True
__init__(self, inital_contents=[])
Stack is constructed to store initial_contents (it can be any iterable).
__iter__(self)
Implement the constructor for the iterator protocol
__str__(self)
Return a string representation of a priority queue
add(self, v)
Add value v to the stack
clear(self)
Clear the stack
is_empty(self)
Return whether the stack is empty
peek(self)
Return (but do not remove) the value at the top of the stack
remove(self)
Remove and return the value at the top of the stack
size(self)
Return the number of values in the stack

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)