Fix error introduced with #10: Fix __delitem__ to remove reference from given key

This commit is contained in:
Lukasz Forynski 2015-04-23 22:00:11 +01:00
parent bfda636ce8
commit 46b456199e
1 changed files with 1 additions and 4 deletions

View File

@ -143,14 +143,11 @@ class multi_key_dict(object):
del self.items_dict[intermediate_key]
# and remove all references (if there were other keys)
for k in self.get_other_keys(key):
for k in self.get_other_keys(key, True):
key_type = str(type(k))
if (key_type in self.__dict__ and k in self.__dict__[key_type]):
del self.__dict__[key_type][k]
# remove the reference from the given key
del self.__dict__[key_type][key]
else:
raise KeyError(key)