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-2.0.5.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9bf82b64b6adfd21de9833854b072f151e8c8be7391549f2d57fe8dada73123 |
|
MD5 | 2b35fa8925ebe3518bc1f851bd268206 |
|
BLAKE2b-256 | aa1d5797aaa601ffb9e873078072222ff4075672d3e2157ef219987f8aa88de5 |