How immutability works in stix2
masterBy design, all STIX 2 data structures in this library are immutable by default.
- Creation: All properties must be provided at the time of object creation.
- Modification: Attempting to change a property after the object has been created will trigger an
Immutabilityerror. - Exceptions: Certain data structures like
ListsandDictionariesallow for content modification (adding or removing items) without triggering an immutability error, providing flexibility when building complex objects.