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.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85e1c4846d25b6205ae51a974d73d2182d2bf3690356b996e245c074b55ae0b9 |
|
MD5 | b0cf548cedd475d35d7e595c89f746fe |
|
BLAKE2b-256 | 542ede658f2e3002871a4aff5521c8527c83df3faa416da84afdcaf8127f2c16 |