def __setitem__(self, key, val): if key in self.settings: self.settings[key].setValue(val) else: raise exceptions.NonexistentSetting(key)
def __getitem__(self, key): if key in self.settings: return self.settings[key].value else: raise exceptions.NonexistentSetting(key)