DeepChainMap from the Python documentation
Project description
DeepChainMap from the Python documentation
pip install pydeepchainmap
Useful stuff from the Python documentation: https://docs.python.org/3/library/collections.html#collections.ChainMap
Tested against Windows 10 / Python 3.10 / Anaconda
>>> d = DeepChainMap({'zebra': 'black'}, {'elephant': 'blue'}, {'lion': 'yellow'})
>>> d['lion'] = 'orange' # update an existing key two levels down
>>> d['snake'] = 'red' # new keys get added to the topmost dict
>>> del d['elephant'] # remove an existing key one level down
>>> d # display result
DeepChainMap({'zebra': 'black', 'snake': 'red'}, {}, {'lion': 'orange'})
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
pydeepchainmap-0.10.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydeepchainmap-0.10.tar.gz.
File metadata
- Download URL: pydeepchainmap-0.10.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f48d0a39b25981aaf1ec3bda5ecab2f5589d239a305fe9279f33ab5ae74c16c
|
|
| MD5 |
dd375cb0bb75d5d3bd2b1107a3e698d8
|
|
| BLAKE2b-256 |
f0a0e65b85b1d207b851b233ccafd807fc70d64fd42841e8e00ebdc6725017fe
|
File details
Details for the file pydeepchainmap-0.10-py3-none-any.whl.
File metadata
- Download URL: pydeepchainmap-0.10-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b93b0082fedd932a4a6615396d5676a350ff4821cbb78c81f46cc6e0a3e58a8
|
|
| MD5 |
39abb5e09787e617a35fd2dfc5c32aae
|
|
| BLAKE2b-256 |
dd246e2c9b2d1261603e8f404097dd27c32a4ee00d4922812e5ff83e9325f1c8
|