I\'m learning Python 3 using The Quick Python Book, where the author talks about frozensets, stating that since sets are mutable and hence unhashable, thereby becoming unfit
Somewhat counter intuitive - what about this bon mot:
sss = frozenset('abc')
sss |= set('efg')
Will yield:
frozenset(['a', 'c', 'b', 'e', 'g', 'f'])
Of course, this is equivalent to x = x | y, so not changing the original frozenset, but it doesn't half make a mockery of the term 'immutable' to the code reviewer!