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.6.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84344f1cb722c6977bea7734716e167be59e1e130ab641d0f41fca19287e146 |
|
MD5 | d6af805f0ed700a3686547b779adc759 |
|
BLAKE2b-256 | c14cf10527393418aa26229ed841a0f8f5e4c3796d4397cc4f4ce3e76e9cc8b1 |