multi_key_dict
multi_key_dict copied to clipboard
Unable to compare two multi_key_dict instances
In python you can compare two dictionaries but if you try to compare two multi_key_dict instances it will return False even when it should not.
#!/usr/bin/env python
from copy import copy
from multi_key_dict import multi_key_dict
k = multi_key_dict()
k['a', 'b'] = 1
print(k == copy(k))
b = {}
a = copy(b)
print(a == b)
The code above is supposed to return True for both cases but as you can probably see, it returns False for multi_key_dict.
This is a serious issue as it also affects pickling and mocking.