| 1 | initial version |
The documentation on sets explains it well:
If
Xis a list, tuple, Python set, orX.is_finite()isTrue, this returns a wrapper around Python’s enumerated immutablefrozensettype 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.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.