KraftDiner <[EMAIL PROTECTED]> wrote: > Cool. > Ok so my histogram class had two methods 1) To increment a point and 2) > to get the point. > > def class histo: > def __init__(self): > histo = {} > def update(point): > '''searches the dictionary for point and if it exists increment the > value. > if it doesn't exist set the value to 1'''
def update(self, point): self.histo[point] = 1 + self.histo.get(point, 0) > > def get(point): def (self, point): actually. > return self.histo[point] > > I'm not sure how to code up the update routine... See above. Alex -- http://mail.python.org/mailman/listinfo/python-list