def __getitem__(self, key): key = key.lower() for k, v in reversed(self._items): if k.lower() == key: return v raise KeyError(key)
def __getitem__(self, key): for k, v in reversed(self._items): if k == key: return v raise KeyError(key)