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.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for coveo_itertools-2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3378af12217f179bf7eb0fe6dd74e9653b4d7dc21b065a8a83947168a546c699 |
|
MD5 | 17671c2157146776b95e898fa96fdc65 |
|
BLAKE2b-256 | eeaaeb923f49f3126b24ab6d18a5a6b5bbba863258282cc22240488b778ee4d8 |