parameters: (filename,
                         encoding=None, mode='r', limit_byte_check=-1)
return_statement: return io.open(filename, mode=mode, encoding=encoding,
                     newline='')
docstring: Return opened file with a specific encoding.
docstring_summary: Return opened file with a specific encoding.
docstring_tokens: Return opened file with a specific encoding .
function: def open_with_encoding(filename,
                         encoding=None, mode='r', limit_byte_check=-1):
      """Return opened file with a specific encoding."""
      if not encoding:
          encoding = detect_encoding(filename, limit_byte_check=limit_byte_check)
  
      return io.open(filename, mode=mode, encoding=encoding,
                     newline='')
function_tokens: def open_with_encoding ( filename , encoding = None , mode = 'r' , limit_byte_check = - 1 ) : if not encoding : encoding = detect_encoding ( filename , limit_byte_check = limit_byte_check ) return io . open ( filename , mode = mode , encoding = encoding , newline = '' )