1 | initial version |
The documentation on sets explains it well:
If
X
is a list, tuple, Python set, orX.is_finite()
isTrue
, this returns a wrapper around Python’s enumerated immutablefrozenset
type with extra functionality. Otherwise it returns a more formal wrapper.If you need the functionality of mutable sets, use Python’s builtin set type.
So Set([a,b])
acts more like Python's frozenset
(hence it has no method to add an element).
If you want a mutable set, just use Python's set
type.