https://github.com/whoeza/dict_and_union_with
A manual solution to the union operation on dictionaries, in Python
https://github.com/whoeza/dict_and_union_with
dict haskell python union union-with
Last synced: 7 months ago
JSON representation
A manual solution to the union operation on dictionaries, in Python
- Host: GitHub
- URL: https://github.com/whoeza/dict_and_union_with
- Owner: Whoeza
- License: gpl-3.0
- Created: 2022-06-06T16:24:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T16:28:27.000Z (over 3 years ago)
- Last Synced: 2024-05-01T19:02:09.629Z (over 1 year ago)
- Topics: dict, haskell, python, union, union-with
- Language: Python
- Homepage: https://pypi.org/project/dict-and-union-with/
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/Whoeza/dict_and_union_with) and
[PyPI](https://pypi.org/project/dict_and_union_with/).## 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](https://github.com/Whoeza/dict_and_union_with/issues) for
support.