In Python 3 the UserDict.DictMixin class was moved to the collections module. The docs suggest using collections.MutableMapping in its
UserDict.DictMixin
collections
collections.MutableMapping
The "number of methods" are specifically __len__ and __iter__ so the additional work is not that much.
__len__
__iter__
def __len__(self): return len(self.mylist) def __iter__(self): for i in self.mylist: yield i
Should work, I think (untested, though).