frozenlist¶
A list-like structure which implements
collections.abc.MutableSequence.
The list is mutable until freeze() is called,
after which list modifications raise RuntimeError. A
FrozenList instance is hashable, but only when frozen.
Attempts to hash a non-frozen instance will result in a RuntimeError
exception.
API¶
- class frozenlist.FrozenList(items)¶
Construct a new non-frozen list from items iterable.
The list implements all
collections.abc.MutableSequencemethods plus two additional APIs.- frozen¶
A read-only property,
Trueis the list is frozen (modifications are forbidden).
- freeze()¶
Freeze the list. There is no way to thaw it back.
Installation¶
$ pip install frozenlist
Documentation¶
Communication channels¶
We have a Matrix Space #aio-libs-space:matrix.org which is also accessible via Gitter.
License¶
frozenlist is offered under the Apache 2 license.
Source code¶
The project is hosted on GitHub
Please file an issue in the bug tracker if you have found a bug or have some suggestions to improve the library.