def dict_has_path(dic, path):
    """Check if a dict contains a value using path syntax.
    """
    cur = dic
    for pat in path.split("."):
        if isinstance(cur, dict) and pat in cur:
            cur = cur[pat]
        else:
            return False
    return True