示例#1
0
文件: Util.py 项目: ricadieg/awips2
def convListToDict(list):
    if len(list) % 2 != 0:
        raise CL.ArgError("Invalid input list " + str(list))
    retVal = []
    while len(list) > 0:
        temp = []
        key = list.pop(0)
        val = list.pop(0)
        temp.append(key)
        temp.append(val)
        retVal.append(temp)
    return dict(retVal)