ailist.AIList.unfreeze#
- AIList.unfreeze(self)#
Make
AIList
mutable- Parameters:
- None
- Returns:
None
See also
AIList.freeze
Make immutable
AIList.sort
Sort intervals inplace
AIList.construct
Construct AIList, required to call AIList.intersect
Examples
>>> from ailist import AIList >>> ail = AIList() >>> ail.add(1, 2) >>> ail.add(3, 4) >>> ail.add(3, 6) >>> ail AIList range: (1-6) (1-2, 0) (3-4, 1) (3-6, 2) >>> ail.freeze() >>> ail.add(9, 10) TypeError: AIList is frozen and currently immutatable. Try '.unfreeze()' to reverse. >>> ail.unfreeze() >>> ail.add(9, 10)