import sys

class Hist(dict):
    def __init__(self, t=[]):
        for item in t:
            self.incr(item)
            
    def incr(self, item, step=1):
        self[item] = self.get(item, 0) + step

    def intersect(self, other):
        for item in other:
            self.incr(item, other[item])
        
def main(*args):
    h1 = Hist('allen downey')
    h2 = Hist('well annoyed')
    print h1
    print h2
    print h1 == h2
    
if __name__ == '__main__':
    main(*sys.argv)
