Is a method of updating nested dictionaries
Project description
update_dict
A Python module who does recursive update work on 2 dicts.
Is a method of updating nested dictionaries
更新多层嵌套字典的键值.
Usage
Installation
pip install update_dict
Examples
# >>> from update_dict import update_dict
# >>> update_dict({'a':{"b":{"c":{"d"}}},"e":{"e1":{"e5":'qwq'}},"e5": {},"ss":"1111"},
{"e5":'www',"ss":"ssss",'c':{},'ss1':'ss'})
{'a': {'b': {'c': {}}}, 'e': {'e1': {'e5': 'www'}}, 'e5': 'www', 'ss': 'ssss'
# >>> update_dict({'a':{"b":{"c":{"d":'c'}}},"e":{"e1":{"e5":'qwq'}},"e5": {},"ss":"1111"},{"d":'www'})
{'a': {'b': {'c': {'d': 'www'}}}, 'e': {'e1': {'e5': 'qwq'}}, 'e5': {}, 'ss': '1111'}
# >>> update_dict({'a': {'c': 1, 'd': {}}, 'b': 4}, {'a': 2})
{'a': 2, 'b': 4}
'''
Why?
License
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
update_dict-1.0.3.tar.gz
(2.0 kB
view details)
File details
Details for the file update_dict-1.0.3.tar.gz.
File metadata
- Download URL: update_dict-1.0.3.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e69e3dfba414e2645e93d06f918e88d2d4ea6b8a6e0976425e6c3fe567035c2c
|
|
| MD5 |
9dfaba430736c68cc0c42098a36736ae
|
|
| BLAKE2b-256 |
4b253e9d15af58af3dcd1d431aefc3466f555a1c400bce7eec09a3d98c739cfd
|