ImmutableList
A tuple-like object that raises useful errors when it is asked to mutate.
Attributes
| Attribute | Type | Description |
|---|---|---|
| warning | string = ImmutableList object is immutable. | The error message string used when raising an AttributeError upon any attempt to mutate the list. |
Methods
complain()
@classmethod
def complain(
*args: any,
**kwargs: any
) - > null
Raises an AttributeError containing the instance's custom warning message to prevent mutation.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | Positional arguments accepted to match the signature of the mutation method being blocked. |
| **kwargs | any | Keyword arguments accepted to match the signature of the mutation method being blocked. |
Returns
| Type | Description |
|---|---|
null | This method never returns as it always raises an AttributeError. |