77# 1f8188eb55931f9e2a00b94ad4501daa_6f620ef <34b4f5f8c2e4e8d305e849ed969d1b03_787452>, 2019
88# Zombie110year <zombie110year@gmail.com>, 2019
99# laazy <laaazy@sjtu.edu.cn>, 2020
10- # Freesand Leo <yuqinju@163.com>, 2020
10+ # Freesand Leo <yuqinju@163.com>, 2021
1111#
1212#, fuzzy
1313msgid ""
@@ -16,7 +16,7 @@ msgstr ""
1616"Report-Msgid-Bugs-To : \n "
1717"POT-Creation-Date : 2021-01-01 05:02+0000\n "
1818"PO-Revision-Date : 2017-02-16 23:18+0000\n "
19- "Last-Translator : Freesand Leo <yuqinju@163.com>, 2020 \n "
19+ "Last-Translator : Freesand Leo <yuqinju@163.com>, 2021 \n "
2020"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2121"MIME-Version : 1.0\n "
2222"Content-Type : text/plain; charset=UTF-8\n "
@@ -163,6 +163,9 @@ msgid ""
163163"that's shared with all other processes mapping the same areas of the file. "
164164"The default value is :const:`MAP_SHARED`."
165165msgstr ""
166+ "*flags* 指明映射的性质。 :const:`MAP_PRIVATE` 会创建私有的写入时拷贝映射,因此对 mmap "
167+ "对象内容的修改将为该进程所私有,而 :const:`MAP_SHARED` 会创建与其他映射同一文件区域的进程所共享的映射。 默认值为 "
168+ ":const:`MAP_SHARED`。"
166169
167170#: ../../library/mmap.rst:86
168171msgid ""
@@ -171,6 +174,9 @@ msgid ""
171174"that the pages may be read or written. *prot* defaults to :const:`PROT_READ"
172175" \\ | PROT_WRITE`."
173176msgstr ""
177+ "如果指明了 *prot*,它将给出所需的内存保护方式;最有用的两个值是 :const:`PROT_READ` 和 "
178+ ":const:`PROT_WRITE`,分别指明页面为可读或可写。 *prot* 默认为 :const:`PROT_READ \\ | "
179+ "PROT_WRITE`。"
174180
175181#: ../../library/mmap.rst:91
176182msgid ""
@@ -179,6 +185,8 @@ msgid ""
179185"*access*. See the description of *access* above for information on how to "
180186"use this parameter."
181187msgstr ""
188+ "可以指定 *access* 作为替代 *flags* 和 *prot* 的可选关键字形参。 同时指定 *flags*, *prot* 和 "
189+ "*access* 将导致错误。 请参阅上文中 *access* 的描述了解有关如何使用此形参的信息。"
182190
183191#: ../../library/mmap.rst:96
184192msgid ""
@@ -187,47 +195,50 @@ msgid ""
187195"defaults to 0. *offset* must be a multiple of :const:`ALLOCATIONGRANULARITY`"
188196" which is equal to :const:`PAGESIZE` on Unix systems."
189197msgstr ""
198+ "*offset* 可以被指定为非负整数偏移量。 mmap 引用将相对于从文件开头的偏移。 *offset* 默认为 0。 *offset* 必须是 "
199+ ":const:`ALLOCATIONGRANULARITY` 的倍数,它在 Unix 系统上等价于 :const:`PAGESIZE`。"
190200
191201#: ../../library/mmap.rst:101
192202msgid ""
193203"To ensure validity of the created memory mapping the file specified by the "
194204"descriptor *fileno* is internally automatically synchronized with physical "
195205"backing store on Mac OS X and OpenVMS."
196206msgstr ""
207+ "要确保已创建内存映射的有效性,描述符 *fileno* 所指定的文件在 Mac OS X 和 OpenVMS 上会与物理后备存储进行内部自动同步。"
197208
198209#: ../../library/mmap.rst:105
199210msgid "This example shows a simple way of using :class:`~mmap.mmap`::"
200- msgstr ""
211+ msgstr "这个例子演示了使用 :class:`~mmap.mmap` 的简单方式:: "
201212
202213#: ../../library/mmap.rst:130
203214msgid ""
204215":class:`~mmap.mmap` can also be used as a context manager in a "
205216":keyword:`with` statement::"
206- msgstr ""
217+ msgstr ":class:`~mmap.mmap` 也可以在 :keyword:`with` 语句中被用作上下文管理器:: "
207218
208219#: ../../library/mmap.rst:138
209220msgid "Context manager support."
210- msgstr ""
221+ msgstr "上下文管理器支持。 "
211222
212223#: ../../library/mmap.rst:142
213224msgid ""
214225"The next example demonstrates how to create an anonymous map and exchange "
215226"data between the parent and child processes::"
216- msgstr ""
227+ msgstr "下面的例子演示了如何创建一个匿名映射并在父进程和子进程之间交换数据。:: "
217228
218229#: ../../library/mmap.rst:161
219230msgid "Memory-mapped file objects support the following methods:"
220- msgstr ""
231+ msgstr "映射内存的文件对象支持以下方法: "
221232
222233#: ../../library/mmap.rst:165
223234msgid ""
224235"Closes the mmap. Subsequent calls to other methods of the object will result"
225236" in a ValueError exception being raised. This will not close the open file."
226- msgstr ""
237+ msgstr "关闭 mmap。 后续调用该对象的其他方法将导致引发 ValueError 异常。 此方法将不会关闭打开的文件。 "
227238
228239#: ../../library/mmap.rst:172
229240msgid "``True`` if the file is closed."
230- msgstr ""
241+ msgstr "如果文件已关闭则返回 ``True``。 "
231242
232243#: ../../library/mmap.rst:179
233244msgid ""
@@ -236,6 +247,8 @@ msgid ""
236247"arguments *start* and *end* are interpreted as in slice notation. Returns "
237248"``-1`` on failure."
238249msgstr ""
250+ "返回子序列 *sub* 在对象内被找到的最小索引号,使得 *sub* 被包含在 [*start*, *end*] 范围中。 可选参数 *start* 和"
251+ " *end* 会被解读为切片表示法。 如果未找到则返回 ``-1``。"
239252
240253#: ../../library/mmap.rst:184 ../../library/mmap.rst:265
241254#: ../../library/mmap.rst:297
@@ -251,19 +264,23 @@ msgid ""
251264"extent of the mapping is flushed. *offset* must be a multiple of the "
252265":const:`PAGESIZE` or :const:`ALLOCATIONGRANULARITY`."
253266msgstr ""
267+ "将对文件的内存副本的修改刷新至磁盘。 如果不使用此调用则无法保证在对象被销毁前将修改写回存储。 如果指定了 *offset* 和 "
268+ "*size*,则只将对指定范围内字节的修改刷新至磁盘;在其他情况下,映射的全部范围都会被刷新。 *offset* 必须为 "
269+ ":const:`PAGESIZE` 或 :const:`ALLOCATIONGRANULARITY` 的倍数。"
254270
255271#: ../../library/mmap.rst:197
256272msgid ""
257273"``None`` is returned to indicate success. An exception is raised when the "
258274"call failed."
259- msgstr ""
275+ msgstr "返回 ``None`` 以表示成功。 当调用失败时将引发异常。 "
260276
261277#: ../../library/mmap.rst:200
262278msgid ""
263279"Previously, a nonzero value was returned on success; zero was returned on "
264280"error under Windows. A zero value was returned on success; an exception was"
265281" raised on error under Unix."
266282msgstr ""
283+ "在之前版本中,成功时将返回非零值;在 Windows 下当发生错误时将返回零。 在 Unix 下 成功时将返回零值;当发生错误时将引发异常。"
267284
268285#: ../../library/mmap.rst:208
269286msgid ""
0 commit comments