def unescape_str(s):
    def replace(m):
        txt = m.group(0)
        c = unescape_dict.get(txt)
        if c is not None:
            return c
        if s.startswith('\\U'):
            return unichr(int(txt[2:], 16))
        else:
            raise ValueError('unknown escape sequence: %s' % repr(s))

    return re_unescape.sub(replace, s[1:-1])
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/unescape_str/original