New submission from ThiefMaster: >>> d = {'1': '2'} >>> {'1'} < d.keys() False >>> {'1'} < set(d.values()) False >>> {'1'} < d.values() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: set() < dict_values()
Same for e.g. the `-` operator. Since dict_keys acts like a real set I think dict_values should do so, too. At least if all the values are hashable. ---------- components: Library (Lib) messages: 234888 nosy: ThiefMaster priority: normal severity: normal status: open title: dict_values should be comparable with a set versions: Python 2.7, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23339> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com