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.8.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a26e8655ac52c2968a757f6077558ceb6a8ba2c1185df44f4188c8879e4b233 |
|
MD5 | 3992085661b69dd1dd5da60eb1c423fb |
|
BLAKE2b-256 | bb87cb4c136581fe1cbf6f316f449387dccf30d80be92f634ec454a1081261c8 |