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.3.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcaed6841baa6d4d962bad662df9f96321fc06653733216158d128b62ff5d729 |
|
MD5 | c9374f381b62b4fdbb39d11835d84aac |
|
BLAKE2b-256 | 4e4d8bdd037edd12023c74c89b5db82c2a9988c07e523f1eb22fecb0c55f8c44 |