Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
treeop-0.0.1.linux-x86_64.tar.gz (4.5 kB) Copy SHA256 Checksum SHA256 any Dumb Binary Jul 6, 2016
treeop-0.0.1-py3.4.egg (6.7 kB) Copy SHA256 Checksum SHA256 3.4 Egg Jul 6, 2016
treeop-0.0.1.tar.gz (2.8 kB) Copy SHA256 Checksum SHA256 Source Jul 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting