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.7.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc209f8602123df0f79044253bdae49c424756557690d12e7f884d8e4c0760cb |
|
MD5 | 26211727aa38abfe2e610ff156bb13b1 |
|
BLAKE2b-256 | 91df90763335a7ed1c0ff7df8dfb451c98213ecf44f3a3b0978c8ef373599738 |