A list-like structure which implements
The list is mutable until
FrozenList.freeze() is called,
after which list modifications raise
FrozenList instance is hashable, but only when frozen.
Attempts to hash a non-frozen instance will result in a
- class frozenlist.FrozenList(items)¶
Construct a new non-frozen list from items iterable.
The list implements all
collections.abc.MutableSequencemethods plus two additional APIs.
A read-only property,
Trueis the list is frozen (modifications are forbidden).
Freeze the list. There is no way to thaw it back.
$ pip install frozenlist
The library requires Python 3.8 or newer.
aio-libs discourse group: https://aio-libs.discourse.group
Feel free to post your questions and ideas here.
gitter chat https://gitter.im/aio-libs/Lobby
Python >= 3.8
frozenlist is offered under the Apache 2 license.
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.