def get_typed_tag_value(v):
    if v.lower() in (u'true', u't'):
        return True
    elif v.lower() in (u'false', u'f'):
        return False
    elif re.match(INTEGER_RE, v):
        return int(v)
    elif re.match(DECIMAL_RE, v) or re.match(DECIMAL_RE2, v):
        try:
            r = float(v)
        except ValueError:
            return toStr(v)
        return r
    elif len(v) > 1 and v[0] == v[-1] and v[0] in (u'"\''):
        return v[1:-1]
    elif len(v) > 1 and ((v[0] == u'[' and v[-1] == ']') or 
                         (v[0] == u'{' and v[-1] == '}')):
         return cline.CScanSplit(v[1:-1], ' \t,', quotes='"\'').words
    else:
        return toStr(v)
Uses some simple rules to extract simple typed values from strings.
dataset/ETHPy150Open njr0/fish/fish/fishlib.py/get_typed_tag_value