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.10.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e3fa384c1f6705c2e620320eff8a3d37ed4d3d13166f7f8e763e0e4d8df22ca |
|
MD5 | d4240a387ed217a61462df15e3a60792 |
|
BLAKE2b-256 | d06dae8c6eaefc5a0121bcfd48b1002a78a3f224fe78c15fb20793eff88984a9 |