

def TDictOf(key_type, val_type):
    'Checks a dict type for the type of its key/values.\n\n  '
    desc = WithDesc(('Dictionary with keys of %s and values of %s' % (Parens(key_type), Parens(key_type))))

    def fn(container):
        return (compat.all((key_type(v) for v in container.keys())) and compat.all((val_type(v) for v in container.values())))
    return desc(TAnd(TDict, fn))

dataset/ETHPy150Open ganeti/ganeti/lib/ht.py TDictOf/VarMisuse@29/90 `val_type`->`key_type`