def has_key(self, key): return irc_lower(key) in self.canon_keys
def __setitem__(self, key, item): if key in self: del self[key] self.data[key] = item self.canon_keys[irc_lower(key)] = key
def __delitem__(self, key): ck = irc_lower(key) del self.data[self.canon_keys[ck]] del self.canon_keys[ck]
def __getitem__(self, key): return self.data[self.canon_keys[irc_lower(key)]]