> > def count(self, value, qty=1): [Aahz] > You mean > def count(self, key, qty=1) > > Right? Yes. Also, there is a typo in the final snippet (pure python version of dictionary of dictionaries). It should read: if key not in d: d[key] = {subkey:value} else: d[key][subkey] = value Raymond