All pastes #96574 Raw Edit

Someone

public text v1 · immutable
#96574 ·published 2006-07-23 00:05 UTC
rendered paste body
def makePropDict(propertiesLine):
    #This will definitively not work if there is more than 3 items in the value

    fields = propertiesLine.split("|")
    resultDict =    {1: {"name" : fields[0],"type" : "bool" },
                    2: {"name" : fields[0],"type" : fields[1] },
                    3: {"name" : fields[0],"type" : fields[1],"defval" : fields[-1] } }[len(fields)]

    return resultDict