Skip to main content

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

This version

0.10

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)

Uploaded Source

Built Distribution

pydeepchainmap-0.10-py3-none-any.whl (4.0 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