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-1.0.5.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d62f915b6db09f1d7554c2416a94ea120cf6b4ca18400192a3faa87b729d8986 |
|
MD5 | f2dfec28f2de53d29dabd9f25177d5a3 |
|
BLAKE2b-256 | e11aeb01b4641eb173ed2b86666f93e6fbffb34c4317f988a539fec34b55e13f |