Skip to main content

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

Project details


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)

Uploaded Source

Built Distribution

nndict-2.0.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page