collection of operations for nested dict, list and tuple.
Project description
collection of operations for nested dict, list and tuple.
Usage
applyto
>>> applyto(print, {"a": [1, 2], "b": [3, 4], level = 1)
[1, 2]
[3, 4]
>>> applyto(print, {"a": [1, 2], "b": [3, 4], level = 2)
1
2
3
4
mapto
>>> mapto(sum, {"a": [1, 2], "b": [3, 4], level = 1)
{'a': 3, 'b': 7}
>>> mapto(lambda x: 2 * x, {"a": [1, 2], "b": [3, 4], level = 2)
{'a': [2, 4], 'b': [6, 8]}
transpose
>>> transpose({"a": [1, 2], "b": [3, 4], levels = [1, 0])
[{"a": 1, "b": 3}, {"a": 2, "b", 4}]
License
These codes are licensed under CC0.
Tips
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
treeop-0.0.1.tar.gz
(2.8 kB
view details)
Built Distributions
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
treeop-0.0.1-py3.4.egg
(6.7 kB
view details)
File details
Details for the file treeop-0.0.1.tar.gz.
File metadata
- Download URL: treeop-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd991de85a31e8cc9fdb7871c0ee56f31ce945465a5431f50c2347ca4855803d
|
|
| MD5 |
2a00b7b0979a5a9f841a0b8cdebe9e07
|
|
| BLAKE2b-256 |
9ef51c42856260754a4a9ca20a3b720e9ec9836f6279da33df00b9ede11142c2
|
File details
Details for the file treeop-0.0.1.linux-x86_64.tar.gz.
File metadata
- Download URL: treeop-0.0.1.linux-x86_64.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b235337958f0ea0b5bd97330392f1b72a22fc1b264cceef829e9d6067f15dc6
|
|
| MD5 |
5bf9043c9728fb7ab6585b775b665e8b
|
|
| BLAKE2b-256 |
5cf2ecd596da5454ccd19927fc4d79038b7e0741d1490c5c16fc2ec4088483f0
|
File details
Details for the file treeop-0.0.1-py3.4.egg.
File metadata
- Download URL: treeop-0.0.1-py3.4.egg
- Upload date:
- Size: 6.7 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f327a104d6d0951c8420654a25c74e8f37f9fb6de148e3206070a1d90751edcb
|
|
| MD5 |
349130ed972a776c79e86e3de8f7b05a
|
|
| BLAKE2b-256 |
2cc98ec69973983901ebd03787416d7026627afbabf679984828b0b4ff39eaeb
|