I have been reading about these dictionary view objects that are returned by the likes of dict.keys(), including the posts on here about the subject. I understand they act as windows to the dictionary's contents without storing a copy of said contents explicitly and in so are more efficient than dynamically updating a list of keys. I also found they are containers (allow use of in operator) but are not sequences (not indexable), although they are iterable.
Overall this sounds to me like a set, since they have access to the dictionary's hash table they even offer the use of set-like operations like intersection/difference. One difference I can think of is that a set, while mutable like these view objects, can only store immutable (and therefore hashable) objects.
However, since a dictionary value doesn't have to be immutable, the values and items view objects are essentially sets with mutable contents, expectedly not supportive of set-like operations (subtraction/intersection). This makes me sceptical of considering these view objects as "a set with a reference to the dictionary".
My question is: are these view objects entirely different to sets but happen to have similar properties? Or are they implemented using sets? Any other major differences between the two? And most importantly - can it be damaging to consider them as "basically sets"?