New submission from Kristian Klette <kle...@klette.us>:
As a user, I expect to be able to compare the different parts a `dict` in the same manner. Currently, `PyDictValues` does not implement the `dictview_richcompare`, causing the `__eq__` to always return false, even if the values are identical. ``` my_dict = {'foo': 'bar'} dict_copy = my_dict.copy() other_dict = {'foo': 'bar', 'bar': 1234} assert my_dict.keys() == my_dict.keys() assert my_dict.keys() == dict_copy.keys() assert my_dict.keys() != other_dict.keys() assert my_dict.items() == my_dict.items() assert my_dict.items() == dict_copy.items() assert my_dict.items() != other_dict.items() assert my_dict.values() == my_dict.values() assert my_dict.values() == dict_copy.values() assert my_dict.values() != other_dict.values() ``` ---------- components: Library (Lib) messages: 347806 nosy: Kristian Klette priority: normal severity: normal status: open title: Comparing PyDictValues does not give expected results type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37585> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com