[issue23339] dict_values should be comparable with a set

2015-01-28 Thread ThiefMaster
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

[issue23339] dict_values should be comparable with a set

2015-01-28 Thread R. David Murray
R. David Murray added the comment: values cannot be a set, since unlike keys it may contain unhashable objects. It would be...really strange and contrary to Python's philosophy to have the validity of an operation depend on the specific data values in a structure rather than its type.