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 hashes)
Built Distribution
Close
Hashes for pydeepchainmap-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b93b0082fedd932a4a6615396d5676a350ff4821cbb78c81f46cc6e0a3e58a8 |
|
MD5 | 39abb5e09787e617a35fd2dfc5c32aae |
|
BLAKE2b-256 | dd246e2c9b2d1261603e8f404097dd27c32a4ee00d4922812e5ff83e9325f1c8 |