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.4.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43d7ea35185ed9d04f5d7c31b35093efcba2f7b5dc7fd406b8df82d46be6f8cf |
|
MD5 | f2db986411b0ade23b04185a6e56576d |
|
BLAKE2b-256 | 93f17a67142645f5e0355c1d133bb78ce31c8d3ac6ebf0b91c509c04d50cf1ef |