On 3/8/2010 9:39 PM, John Posner wrote: <snip> > # gather data > tally_dict = defaultdict(Tally) > for i in range(len(x)): > obj = tally_dict[y[i]] > obj.id = y[i] <--- statement redundant, remove it > obj.total += x[i] > obj.count += 1 -John