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.2.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94f41dd54c23ca35a42e9e00a0ca0b26959a208fbfae5d0c248cef749aaf88a5 |
|
MD5 | 561f8639afdc14281416f1a8e0efa31f |
|
BLAKE2b-256 | 54cfb9d1f9594f1dbd1b4c9ee31c7d998cb3c1acd59238d35b7232aa7a790615 |