@@ -71,36 +71,45 @@ msgid ""
7171" may not overlap. Adjacent regions are not merged; they must be unlocked "
7272"individually."
7373msgstr ""
74+ "基于文件描述符 *fd* 从 C 运行时锁定文件的某一部分。 失败时引发 :exc:`OSError`。 锁定的文件区域从当前文件位置开始扩展 "
75+ "*nbytes* 个字节,并可能持续到超出文件末尾。 *mode* 必须为下面列出的 :const:`LK_\\ *` 之一。 "
76+ "一个文件中的多个区域可以被同时锁定,但是不能重叠。 相邻区域不会被合并;它们必须单独被解锁。"
7477
7578#: ../../library/msvcrt.rst:45
7679msgid ""
7780"Raises an :ref:`auditing event <auditing>` ``msvcrt.locking`` with arguments"
7881" ``fd``, ``mode``, ``nbytes``."
7982msgstr ""
83+ "引发一个 :ref:`审计事件 <auditing>` ``msvcrt.locking``,附带参数 ``fd``, ``mode``, "
84+ "``nbytes``。"
8085
8186#: ../../library/msvcrt.rst:51
8287msgid ""
8388"Locks the specified bytes. If the bytes cannot be locked, the program "
8489"immediately tries again after 1 second. If, after 10 attempts, the bytes "
8590"cannot be locked, :exc:`OSError` is raised."
8691msgstr ""
92+ "锁定指定的字节数据。 如果字节数据无法被锁定,程序会在 1 秒之后立即重试。 如果在 10 次尝试后字节数据仍无法被锁定,则会引发 "
93+ ":exc:`OSError`。"
8794
8895#: ../../library/msvcrt.rst:59
8996msgid ""
9097"Locks the specified bytes. If the bytes cannot be locked, :exc:`OSError` is "
9198"raised."
92- msgstr ""
99+ msgstr "锁定指定的字节数据。 如果字节数据无法被锁定,则会引发 :exc:`OSError`。 "
93100
94101#: ../../library/msvcrt.rst:65
95102msgid "Unlocks the specified bytes, which must have been previously locked."
96- msgstr ""
103+ msgstr "解锁指定的字节数据,该对象必须在之前被锁定。 "
97104
98105#: ../../library/msvcrt.rst:70
99106msgid ""
100107"Set the line-end translation mode for the file descriptor *fd*. To set it to"
101108" text mode, *flags* should be :const:`os.O_TEXT`; for binary, it should be "
102109":const:`os.O_BINARY`."
103110msgstr ""
111+ "设置文件描述符 *fd* 的行结束符转写模式。 要将其设为文本模式,则 *flags* 应当为 "
112+ ":const:`os.O_TEXT`;设为二进制模式,则应当为 :const:`os.O_BINARY`。"
104113
105114#: ../../library/msvcrt.rst:77
106115msgid ""
@@ -109,6 +118,9 @@ msgid ""
109118":const:`os.O_RDONLY`, and :const:`os.O_TEXT`. The returned file descriptor "
110119"may be used as a parameter to :func:`os.fdopen` to create a file object."
111120msgstr ""
121+ "基于文件句柄 *handle* 创建一个 C 运行时文件描述符。 *flags* 形参应当 :const:`os.O_APPEND`, "
122+ ":const:`os.O_RDONLY` 和 :const:`os.O_TEXT` 按位 OR 的结果。 返回的文件描述符可以被用作 "
123+ ":func:`os.fdopen` 的形参以创建一个文件对象。"
112124
113125#: ../../library/msvcrt.rst:82
114126msgid ""
0 commit comments