Even though sets are unhashable, membership check in other set works:
>>> set() in {frozenset()} True
I expected TypeError:
TypeError:
The last line of the documentation for sets discusses this:
Note, the elem argument to the __contains__(), remove(), and discard() methods may be a set. To support searching for an equivalent frozenset, a temporary one is created from elem.
elem
set
frozenset