def __delitem__(self, key):
key_type = str(type(key))<EOL>if (key in self and<EOL>self.items_dict and<EOL>(self.__dict__[key_type][key] in self.items_dict) ):<EOL><INDENT>intermediate_key = self.__dict__[key_type][key]<EOL>del self.items_dict[intermediate_key]<EOL>for k in self.get_other_keys(key, True):<EOL><INDENT>key_type = str(type(k))<EOL>if (key_type in self.__dict__ and k in self.__dict__[key_type]):<EOL><INDENT>del self.__dict__[key_type][k]<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise KeyError(key)<EOL><DEDENT>
Called to implement deletion of self[key].