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.9.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e8d3e952fb8085ae21f10cb3c9a072eb402b4aac74e1b10c86b4d71f5bb9911 |
|
MD5 | efb485ce9c6751e4eb834177d0f45c1b |
|
BLAKE2b-256 | 4f2683ee79e138fd3834fe60bab141ec80f2ebf3ae2a88020fd9c43ba6e07e92 |