

def TListOf(my_type):
    'Checks if a given value is a list with all elements of the same type.\n\n  '
    desc = WithDesc(('List of %s' % (Parens(my_type),)))
    return desc(TAnd(TList, (lambda lst: compat.all((my_type(v) for v in lst)))))

dataset/ETHPy150Open ganeti/ganeti/lib/ht.py TListOf/original