multi_key_dict icon indicating copy to clipboard operation
multi_key_dict copied to clipboard

Unable to compare two multi_key_dict instances

Open ssbarnea opened this issue 7 years ago • 3 comments

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.

ssbarnea avatar Dec 21 '16 21:12 ssbarnea