Skip to main content

A manual solution to the union operation on dictionaries, in Python

Project description

dict_and_union_with

A manual solution to the union operation on dictionaries, in Python

Inspired by union_with from Haskell.

Keep in mind that Python now has a union operator:

dict_one |= dict_two # union dict_two into dict_one

dict_union = dict_one | dict_two # dict_union is the union of dict_one and dict_two

In dict_and_union_with, these instructions become:

union_with(dict_one, dict_two) # union dict_two into dict_one

dict_union = union_all_with(dict_union, [dict_one, dict_two]) # dict_union is the union of dict_one and dict_two

Open source available on GitHub and PyPI.

Installation

Install from pip:

py -m pip install dict_and_union_with

Update to the latest version from pip:

py -m pip install --upgrade dict_and_union_with

Uninstall from pip:

py -m pip uninstall dict_and_union_with

Building from sources

Run this command from the package directory on your filesystem:

py -m build

Community

Open a new issue for support.

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

dict_and_union_with-1.0.0.tar.gz (14.9 kB view hashes)

Uploaded Source

Built Distribution

dict_and_union_with-1.0.0-py3-none-any.whl (15.3 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