Skip to content

Unable to compare two multi_key_dict instances #17

@ssbarnea

Description

@ssbarnea

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions