@@ -1616,6 +1616,9 @@ msgid ""
16161616"in Python 3.0. Refer to the documentation of the :ref:`newline <open-"
16171617"newline-parameter>` parameter for further details."
16181618msgstr ""
1619+ "此外还允许使用一个模式字符 ``'U'``,该字符已不再具有任何效果,并被视为已弃用。 之前它会在文本模式中启用 :term:`universal "
1620+ "newlines`,这在 Python 3.0 中成为默认行为。 请参阅 :ref:`newline <open-newline-parameter>`"
1621+ " 形参的文档了解更多细节。"
16191622
16201623#: ../../library/functions.rst:1022
16211624msgid ""
@@ -1795,8 +1798,7 @@ msgid ""
17951798"The following example uses the :ref:`dir_fd <dir_fd>` parameter of the "
17961799":func:`os.open` function to open a file relative to a given directory::"
17971800msgstr ""
1798- "下面的示例使用 :func:`os.open` 函数返回值传给 :ref:`dir_fd <dir_fd>` "
1799- "的形参,从给定的目录中用相对路径打开文件::"
1801+ "下面的示例使用 :func:`os.open` 函数的 :ref:`dir_fd <dir_fd>` 的形参,从给定的目录中用相对路径打开文件::"
18001802
18011803#: ../../library/functions.rst:1132
18021804msgid ""
@@ -1812,6 +1814,13 @@ msgid ""
18121814"is disabled, the raw stream, a subclass of :class:`io.RawIOBase`, "
18131815":class:`io.FileIO`, is returned."
18141816msgstr ""
1817+ ":func:`open` 函数所返回的 :term:`file object` 类型取决于所用模式。 当使用 :func:`open` 以文本模式 "
1818+ "(``'w'``, ``'r'``, ``'wt'``, ``'rt'`` 等) 打开文件时,它将返回 :class:`io.TextIOBase` "
1819+ "(特别是 :class:`io.TextIOWrapper`) 的一个子类。 当使用缓冲以二进制模式打开文件时,返回的类是 "
1820+ ":class:`io.BufferedIOBase` 的一个子类。 具体的类会有多种:在只读的二进制模式下,它将返回 "
1821+ ":class:`io.BufferedReader`;在写入二进制和追加二进制模式下,它将返回 "
1822+ ":class:`io.BufferedWriter`,而在读/写模式下,它将返回 :class:`io.BufferedRandom`。 "
1823+ "当禁用缓冲时,则会返回原始流,即 :class:`io.RawIOBase` 的一个子类 :class:`io.FileIO`。"
18151824
18161825#: ../../library/functions.rst:1153
18171826msgid ""
0 commit comments