Frozensets are immutable and not assignable

suggest change
foo = frozenset(["bar", 1, "Hello!"])
foo[2] = 7 # ERROR
foo.add(3) # ERROR

The second line raises TypeError: 'frozenset' object does not support item assignment. The third line raises AttributeError because frozenset has no add method.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents