class MyDict(Mapping):

    def __init__(self, d):
        self.d = d

def __getitem__(self, k):
    return self.d[k]

def __iter__(self):
    return self.__iter__()

def __setitem__(self, k, v):
    if k not in list(self.d.keys()):
        pass
Exposing `defaultdict` as a regular `dict`