ailist.AIList.freeze#
- AIList.freeze(self)#
Make
AIList
immutable- Parameters:
- None
- Returns:
None
See also
AIList.unfreeze
Make mutable
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.