A dict that does not support None entries. Silently deletes entry if updated to null and works recursively.
Project description
NeverNoneDict
Python Dictionary that does not have None values.
Installing
You can start using nn dict by installing it using pip.
pip install nndict
Using nndict
>nndict_ = nndict({"a": 2, "b": None, "c": {"d": None}})
>print(nndict_)
{'a': 2, 'c': {}}
>nndict_ = nndict({"a": 2})
>print(nndict_)
{'a': 2}
>nndict_["a"] = None
>print(nndict_)
{}
Running the tests
Make sure you have the python versions listed in tox.ini installed. Then run tox:
tox
Authors
- Tiago Santos - Initial work - tiago.santos@vizidox.com
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
nndict-2.0.1.tar.gz
(2.6 kB
view hashes)
Built Distribution
nndict-2.0.1-py3-none-any.whl
(2.8 kB
view hashes)