parameters: (fname, **kwargs)
return_statement: return open(fname, "rt", **kwargs)
docstring: On Python 3 opens a file in text mode by using fs encoding and
      a proper en/decoding errors handler.
      On Python 2 this is just an alias for open(name, 'rt').
docstring_summary: On Python 3 opens a file in text mode by using fs encoding and
      a proper en/decoding errors handler.
      On Python 2 this is just an alias for open(name, 'rt').
docstring_tokens: On Python 3 opens a file in text mode by using fs encoding and a proper en / decoding errors handler . On Python 2 this is just an alias for open ( name rt ) .
function: def open_text(fname, **kwargs):
      """On Python 3 opens a file in text mode by using fs encoding and
      a proper en/decoding errors handler.
      On Python 2 this is just an alias for open(name, 'rt').
      """
      if PY3:
          # See:
          # https://github.com/giampaolo/psutil/issues/675
          # https://github.com/giampaolo/psutil/pull/733
          kwargs.setdefault('encoding', ENCODING)
          kwargs.setdefault('errors', ENCODING_ERRS)
      return open(fname, "rt", **kwargs)
function_tokens: def open_text ( fname , * * kwargs ) : if PY3 : # See: # https://github.com/giampaolo/psutil/issues/675 # https://github.com/giampaolo/psutil/pull/733 kwargs . setdefault ( 'encoding' , ENCODING ) kwargs . setdefault ( 'errors' , ENCODING_ERRS ) return open ( fname , "rt" , * * kwargs )