parameters: (s)
return_statement: return ''.join(res)
docstring: unquote('abc%20def') -> 'abc def'.
docstring_summary: unquote('abc%20def') -> 'abc def'.
docstring_tokens: unquote ( abc%20def ) - > abc def .
function: def unquote(s):
      """unquote('abc%20def') -> 'abc def'."""
      if _is_unicode(s):
          if '%' not in s:
              return s
          bits = _asciire.split(s)
          res = [bits[0]]
          append = res.append
          for i in range(1, len(bits), 2):
              append(unquote(str(bits[i])).decode('latin1'))
              append(bits[i + 1])
          return ''.join(res)
  
      bits = s.split('%')
      # fastpath
      if len(bits) == 1:
          return s
      res = [bits[0]]
      append = res.append
      for item in bits[1:]:
          try:
              append(_hextochr[item[:2]])
              append(item[2:])
          except KeyError:
              append('%')
              append(item)
      return ''.join(res)
function_tokens: def unquote ( s ) : if _is_unicode ( s ) : if '%' not in s : return s bits = _asciire . split ( s ) res = [ bits [ 0 ] ] append = res . append for i in range ( 1 , len ( bits ) , 2 ) : append ( unquote ( str ( bits [ i ] ) ) . decode ( 'latin1' ) ) append ( bits [ i + 1 ] ) return '' . join ( res ) bits = s . split ( '%' ) # fastpath if len ( bits ) == 1 : return s res = [ bits [ 0 ] ] append = res . append for item in bits [ 1 : ] : try : append ( _hextochr [ item [ : 2 ] ] ) append ( item [ 2 : ] ) except KeyError : append ( '%' ) append ( item ) return '' . join ( res )