

def __setitem__(self, key, value):
    'strict static key enforcement'
    if (key in iter(self.keys())):
        dict.__setitem__(self, key, value)
    else:
        raise KeyError(key)

dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py Metadata.__setitem__/original