

def CombinationDesc(op, args, fn):
    'Build description for combinating operator.\n\n  @type op: string\n  @param op: Operator as text (e.g. "and")\n  @type args: list\n  @param args: Operator arguments\n  @type fn: callable\n  @param fn: Wrapped function\n\n  '
    if (__debug__ and (TNone in args) and (args.index(TNone) > 0)):
        raise Exception('TNone must be listed first')
    if (len(args) == 1):
        descr = str(args[0])
    else:
        descr = (' %s ' % op).join((Parens(i) for i in args))
    return WithDesc(descr)(fn)

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