def unquote(s):
if _is_unicode(s):<EOL><INDENT>if '<STR_LIT:%>' not in s:<EOL><INDENT>return s<EOL><DEDENT>bits = _asciire.split(s)<EOL>res = [bits[<NUM_LIT:0>]]<EOL>append = res.append<EOL>for i in range(<NUM_LIT:1>, len(bits), <NUM_LIT:2>):<EOL><INDENT>append(unquote(str(bits[i])).decode('<STR_LIT>'))<EOL>append(bits[i + <NUM_LIT:1>])<EOL><DEDENT>return '<STR_LIT>'.join(res)<EOL><DEDENT>bits = s.split('<STR_LIT:%>')<EOL>if len(bits) == <NUM_LIT:1>:<EOL><INDENT>return s<EOL><DEDENT>res = [bits[<NUM_LIT:0>]]<EOL>append = res.append<EOL>for item in bits[<NUM_LIT:1>:]:<EOL><INDENT>try:<EOL><INDENT>append(_hextochr[item[:<NUM_LIT:2>]])<EOL>append(item[<NUM_LIT:2>:])<EOL><DEDENT>except KeyError:<EOL><INDENT>append('<STR_LIT:%>')<EOL>append(item)<EOL><DEDENT><DEDENT>return '<STR_LIT>'.join(res)<EOL>
unquote('abc%20def') -> 'abc def'.