Note: code examples in python3, but the question stands for python2 as well (replacing .keys
with .viewkeys
, etc)<
The reason is that it's not implemented in the dict_values
type or because the dict_values
class specifically disallows it.
Since your values are generally a non-unique list of items it's not a great idea to convert it to a set. If you do want that, just manually convert it. My assumption is that it's disallowed since it's generally a bad idea as it can cause data loss.