kitir/utils.py
def deepgetkey(col, key, default=None, raise_if_missing=False):
    """Recurses through a key chain to get the ultimate value."""
    if isinstance(key, str):
        key = key.split('.')
    try:
        return functools.reduce(dict.get, key, col)
    except KeyError:
        if raise_if_missing:
            raise
        return default
Recurses through a key chain to get the ultimate value.
Recurses through a key chain to get the ultimate value.
Recurses through a key chain to get the ultimate value .
def deepgetkey(col, key, default=None, raise_if_missing=False):
    if isinstance(key, str):
        key = key.split('.')
    try:
        return functools.reduce(dict.get, key, col)
    except KeyError:
        if raise_if_missing:
            raise
        return default
def deepgetkey ( col , key , default = None , raise_if_missing = False ) : if isinstance ( key , str ) : key = key . split ( '.' ) try : return functools . reduce ( dict . get , key , col ) except KeyError : if raise_if_missing : raise return default
Recurses through a key chain to get the ultimate value.
Recurses through a key chain to get the ultimate value .
"""Recurses through a key chain to get the ultimate value."""
col
key
default
raise_if_missing