Collection-related helpers.
Project description
coveo-itertools
Another spin on iteration goodness.
dict lookup
A one-liner function to retrieve a value from a dictionary:
from typing import Dict, Any
from coveo_itertools.lookups import dict_lookup
example: Dict[str, Any] = {'nested': {'key': {'lookup': True}}}
assert dict_lookup(example, 'nested', 'key', 'lookup') == True
assert dict_lookup(example, 'not', 'there', default=None) is None
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
coveo-itertools-1.0.1.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 682c6d48f9c9bd274985af9b9017c58e44492f5e298053e2cbb49a439432a54b |
|
MD5 | 3d7ec4718c27c4f4bb13324f8eb7fbaa |
|
BLAKE2b-256 | d4475b954611c71d1692b97967de77714720ba02975ce38e0cf82df3de580296 |