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.6.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6469bba1eed2702511b4a5acf553d08d67df814232233bfb59d9307693fba04 |
|
MD5 | 8589613e5f24e85c81e7c746cfe0ccb1 |
|
BLAKE2b-256 | b5b180a6fd8ff703d0cf89f769cf8379d8d224efdc18c1b7559a54dcc6e8e82a |