Class ImmutableList
A tuple-like object that raises useful errors when it is asked to mutate.
Declaration
class ImmutableList(tuple)
source linkDocumentation
Example::
>>> a = ImmutableList(range(5), warning="You cannot mutate this.")
>>> a[3] = '4'
Traceback (most recent call last):
...
AttributeError: You cannot mutate this.
Methods
▷ def __new__(cls, *args, warning='ImmutableList object is immutable.', **kwargs)
Reexports