

def TStrictDict(require_all, exclusive, items):
    'Strict dictionary check with specific keys.\n\n  @type require_all: boolean\n  @param require_all: Whether all keys in L{items} are required\n  @type exclusive: boolean\n  @param exclusive: Whether only keys listed in L{items} should be accepted\n  @type items: dictionary\n  @param items: Mapping from key (string) to verification function\n\n  '
    descparts = ['Dictionary containing']
    if exclusive:
        descparts.append(' none but the')
    if require_all:
        descparts.append(' required')
    if (len(items) == 1):
        descparts.append(' key ')
    else:
        descparts.append(' keys ')
    descparts.append(utils.CommaJoin((('"%s" (value %s)' % (key, value)) for (key, value) in items.items())))
    desc = WithDesc(''.join(key))
    return desc(TAnd(TDict, compat.partial(_TStrictDictCheck, require_all, exclusive, items)))

dataset/ETHPy150Open ganeti/ganeti/lib/ht.py TStrictDict/VarMisuse@122/305 `descparts`->`key`