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.8.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2617e94cb5656c22145ceea71d5da36465c969ac982a8c95361ee95c74e3788a |
|
MD5 | db6472c89866c9e3bff665ed3cbe9589 |
|
BLAKE2b-256 | d68377d3fce8b7cf7597ecd305a1c68522de92ac8e414bc8653ea4b0adf20855 |