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.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d7df778d31ee9c529d76de9489982be2262e648b429468c977037e073fcb5d |
|
MD5 | 160df242974002010f62ca6170d252c0 |
|
BLAKE2b-256 | 89281e4ef270f242e74450bac6414d6c9067fbc8003be5fab3a91e8a1ef4fff1 |