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
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 Distribution
File details
Details for the file dict_and_union_with-1.0.0.tar.gz
.
File metadata
- Download URL: dict_and_union_with-1.0.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13cc30c128c96115a3dd1dfc56f74cdcbb4f9d76209c612cc3641bab5bf2719b |
|
MD5 | c3891ce894bc3c0950eac4f42d5adaf5 |
|
BLAKE2b-256 | 370acd1c13df21cc576f430f1ac793f9df5e5ca68a8b60b1aefec718a1898408 |
File details
Details for the file dict_and_union_with-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: dict_and_union_with-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a5df7b73915d4b3a1b04bd0079ffc4d229d43a904e5bdf6ba68153a9b42dc9 |
|
MD5 | 43bf6cafe7468e353f446bc2e634d45e |
|
BLAKE2b-256 | 879b1522297f666d77a50c6deea2b8e6829d1cd7c6d39169fb440ae9035dc196 |