@@ -938,12 +938,18 @@ msgid ""
938938"implies writing, so this mode behaves in a similar way to ``'w'``. Add a "
939939"``'+'`` to the mode to allow simultaneous reading and writing."
940940msgstr ""
941+ "*mode* 可以为 ``'r'``, ``'w'``, ``'x'`` 或 ``'a'`` 分别表示读取(默认模式)、写入、独占新建或添加。 "
942+ "如果以写入或添加模式打开的文件不存在将自动新建;当以写入模式打开时文件将先清空。 以新建模式打开时如果文件已存在则将引发 "
943+ ":exc:`FileExistsError`。 以新建模式打开文件也意味着要写入,因此该模式的行为与 ``'w'`` 类似。 在模式中附带 "
944+ "``'+'`` 将允许同时读取和写入。"
941945
942946#: ../../library/io.rst:582
943947msgid ""
944948"The :meth:`read` (when called with a positive argument), :meth:`readinto` "
945949"and :meth:`write` methods on this class will only make one system call."
946950msgstr ""
951+ "该类的 :meth:`read` (当附带正值参数调用时), :meth:`readinto` 和 :meth:`write` "
952+ "方法将只执行一次系统调用。"
947953
948954#: ../../library/io.rst:585
949955msgid ""
@@ -953,6 +959,9 @@ msgid ""
953959"descriptor (passing :mod:`os.open` as *opener* results in functionality "
954960"similar to passing ``None``)."
955961msgstr ""
962+ "可以通过传入一个可调用对象作为 *opener* 来使用自定义文件打开器。 然后通过调用 *opener* 并传入 (*name*, *flags*) "
963+ "来获取文件对象所对应的下层文件描述符。 *opener* 必须返回一个打开文件描述符(传入 :mod:`os.open` 作为 *opener* "
964+ "的结果在功能上将与传入 ``None`` 类似)。"
956965
957966#: ../../library/io.rst:591
958967msgid "The newly created file is :ref:`non-inheritable <fd_inheritance>`."
@@ -977,6 +986,8 @@ msgid ""
977986"In addition to the attributes and methods from :class:`IOBase` and "
978987":class:`RawIOBase`, :class:`FileIO` provides the following data attributes:"
979988msgstr ""
989+ "除了来自 :class:`IOBase` 和 :class:`RawIOBase` 的属性和方法之外,:class:`FileIO` "
990+ "还提供了下列数据属性:"
980991
981992#: ../../library/io.rst:609
982993msgid "The mode as given in the constructor."
0 commit comments