parameters: (s)
return_statement: return u'"' + ESCAPE.sub(replace, s) + u'"'
docstring: Return a JSON representation of a Python string
docstring_summary: Return a JSON representation of a Python string
docstring_tokens: Return a JSON representation of a Python string
function: def encode_basestring(s):
      """Return a JSON representation of a Python string
  
      """
      if isinstance(s, str) and HAS_UTF8.search(s) is not None:
          s = s.decode('utf-8')
      def replace(match):
          return ESCAPE_DCT[match.group(0)]
      return u'"' + ESCAPE.sub(replace, s) + u'"'
function_tokens: def encode_basestring ( s ) : if isinstance ( s , str ) and HAS_UTF8 . search ( s ) is not None : s = s . decode ( 'utf-8' ) def replace ( match ) : return ESCAPE_DCT [ match . group ( 0 ) ] return u'"' + ESCAPE . sub ( replace , s ) + u'"'