'Prevents invalid keys from being retrieved.'

def __getitem__(self, key):

    if (key in self._valid_keys):
        return dict.__getitem__(self, key)
    else:
        raise KeyError((self._invalid_key % key))
