It is useful if objects can be locked and considered immutable. Numpy arrays can be flagged as locked, which makes them immutable. This mixin should offer easy access to those flags. Non-arrays may be prevented from being overwritten using a custom __setattr__ method. Lists may be converted to tuples. Dicts may be converted to typing.MappingProxyType. However, locking of nested objects is not trivial.
It is useful if objects can be locked and considered immutable. Numpy arrays can be flagged as locked, which makes them immutable. This mixin should offer easy access to those flags. Non-arrays may be prevented from being overwritten using a custom
__setattr__method. Lists may be converted to tuples.Dicts may be converted totyping.MappingProxyType. However, locking of nested objects is not trivial.