A list-like structure which implements collections.abc.MutableSequence
Project description
frozenlist
Introduction
frozenlist.FrozenList is a list-like structure which implements collections.abc.MutableSequence. The list is mutable until FrozenList.freeze is called, after which list modifications raise RuntimeError:
>>> from frozenlist import FrozenList >>> fl = FrozenList([17, 42]) >>> fl <FrozenList(frozen=False, [17, 42, 'spam', 'Vikings'])> >>> fl.freeze() >>> fl <FrozenList(frozen=True, [17, 42, 'spam', 'Vikings'])> >>> fl.frozen True >>> fl.append("Monty") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "frozenlist/_frozenlist.pyx", line 97, in frozenlist._frozenlist.FrozenList.append self._check_frozen() File "frozenlist/_frozenlist.pyx", line 19, in frozenlist._frozenlist.FrozenList._check_frozen raise RuntimeError("Cannot modify frozen list.") RuntimeError: Cannot modify frozen list.
Installation
$ pip install frozenlist
The library requires Python 3.6 or newer.
Documentation
Communication channels
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
Requirements
Python >= 3.6
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.
Changelog
1.0.0 (2019-11-09)
Deprecations and Removals
Dropped support for Python 3.5; only 3.6, 3.7 and 3.8 are supported going forward. #24
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for frozenlist-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85b5e98aff043e2276ef0656744992fffaf73bb12ae96e1e071023efa7f3ec12 |
|
MD5 | eb35beedaaaff4aebd887d4183da3c26 |
|
BLAKE2b-256 | a4be1d11c5a9df613b8c50d66b38689202172970e4228185fb927a8bf30fe49f |
Hashes for frozenlist-1.0.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21b9123eeed3b4506843649cb51ad5cd2dd0568687c8439744c846a64314ece8 |
|
MD5 | f4dc2936ac9b43fb39cfd16ce6220308 |
|
BLAKE2b-256 | 0242da7f20dc8975234ed47a79ff462d004f02dc9e3fd3f288fc2ded86652a29 |
Hashes for frozenlist-1.0.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81c08c2dd95a5dbe3be17b0bdd32e1062f7b295645d5fa409472439b1aa3a008 |
|
MD5 | 892113d67f6ce18744964ff755958cd8 |
|
BLAKE2b-256 | 547bbdad50f714117150e0a762c14d78d2193d66731eca06fccc63c101fe4a2c |
Hashes for frozenlist-1.0.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbdd0515c711101d6115989989a6cbd9e2222045f55e35708726874db2c2278c |
|
MD5 | 07a806a5d965195c1d44b37a09bca1a8 |
|
BLAKE2b-256 | 2722e2599dbc7941987f2663fd00bcedd97f710351450d168b8d64bed991b451 |
Hashes for frozenlist-1.0.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1ea2e4aa95cccaf9a8ec44b48fb98b5bd1d8bc33a2a907697ff3e0395e1ff5f |
|
MD5 | ebdd0932408ccbf8db8d11cf7e0cc12a |
|
BLAKE2b-256 | c30ea34a73e8de033a09216cae5917a32ce30f5b250f1a82a7905cd3be564178 |
Hashes for frozenlist-1.0.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f28e979fb37202b81de3c495ff358d1b6510629dca17d1c4a7b6ffe05b0f2fe7 |
|
MD5 | 8a126364719f3b57998742239174073d |
|
BLAKE2b-256 | 6a9506fe4e4438818b188f0b17023542a585be8deee646a86184e504de0262b5 |
Hashes for frozenlist-1.0.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c2ffe402c7c476610853e054c711186811fe42fe7333d8b29ac3bf823e43cf6 |
|
MD5 | 7ab3b1df6eea15b907d99e1b580b40ac |
|
BLAKE2b-256 | eb3c11cbaafcb1b8d8376f531d9c6e47b8d6d4894bd6fe5af8d07a81c78c5e18 |
Hashes for frozenlist-1.0.0-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dee95741a275f26b50dc1bad68608ceed564216be7259627aef5b6161b023282 |
|
MD5 | edf93b03088fa7e259ecc16d7deba6db |
|
BLAKE2b-256 | b4ab09c310cc613aee48e3a641dfff2217542f89da827e583ffda995ed1341d1 |
Hashes for frozenlist-1.0.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c9eed7094ecffd5963de7b124586608bfb0d87bbad0750d3f2443bde1968ba9 |
|
MD5 | a0f576f2a955f80fc3d75aa3251fb5a5 |
|
BLAKE2b-256 | 28ba77f7ab10c2e439ed1d597ebd2e696ab4245b4a68f851e91644b57f0bd37b |
Hashes for frozenlist-1.0.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e18973689c15de890d4eaf4e364a167fd62759fcc77e37dc526ab2585c25863 |
|
MD5 | 6c0b48aa29c9e99985425296e52f80de |
|
BLAKE2b-256 | f19afc5b8ded015d0cb0bf255c77318d9ad7be7b379ce568276a7de8a8fb8948 |
Hashes for frozenlist-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e758c8d9504fcb26a9292176e49c4ca4834eaf09e47a371ed9eb0d5bc5f4c40 |
|
MD5 | 05ace07809a5b78f8e68d69c5cb62862 |
|
BLAKE2b-256 | 74f064ad9e124bca0ddf17813b1ae307ed3841c431c1df439d0138b3ee6237c5 |
Hashes for frozenlist-1.0.0-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94e75920c6ccadd48e6c11667679ddc423a51950ff491f4333004d6eb5937786 |
|
MD5 | 78f0b80b0da97223de4221aedd96cafb |
|
BLAKE2b-256 | 1b00c74d7ed46ccd43b8bd79de74fce233aba4e5149af96f4c1fe9ffa513ebf7 |