@@ -291,17 +291,22 @@ msgid ""
291291"systems (including Linux), *start* must be a multiple of the "
292292":const:`PAGESIZE`."
293293msgstr ""
294+ "将有关内存区域的建议 *option* 发送至内核,从 *start* 开始扩展 *length* 个字节。 *option* 必须为系统中可用的 "
295+ ":ref:`MADV_* 常量 <madvise-constants>` 之一。 如果省略 *start* 和 *length*,则会包含整个映射。 "
296+ "在某些系统中(包括 Linux),*start* 必须为 :const:`PAGESIZE` 的倍数。"
294297
295298#: ../../library/mmap.rst:215
296299msgid "Availability: Systems with the ``madvise()`` system call."
297- msgstr ""
300+ msgstr "可用性: 具有 ``madvise()`` 系统调用的系统。 "
298301
299302#: ../../library/mmap.rst:222
300303msgid ""
301304"Copy the *count* bytes starting at offset *src* to the destination index "
302305"*dest*. If the mmap was created with :const:`ACCESS_READ`, then calls to "
303306"move will raise a :exc:`TypeError` exception."
304307msgstr ""
308+ "将从偏移量 *src* 开始的 *count* 个字节拷贝到目标索引号 *dest*。 如果 mmap 创建时设置了 "
309+ ":const:`ACCESS_READ`,则调用 move 将引发 :exc:`TypeError` 异常。"
305310
306311#: ../../library/mmap.rst:229
307312msgid ""
@@ -310,30 +315,34 @@ msgid ""
310315" bytes from the current file position to the end of the mapping. The file "
311316"position is updated to point after the bytes that were returned."
312317msgstr ""
318+ "返回一个 :class:`bytes`,其中包含从当前文件位置开始的至多 *n* 个字节。 如果参数省略,为 ``None`` "
319+ "或负数,则返回从当前文件位置开始直至映射结尾的所有字节。 文件位置会被更新为返回字节数据之后的位置。"
313320
314321#: ../../library/mmap.rst:235
315322msgid "Argument can be omitted or ``None``."
316- msgstr ""
323+ msgstr "参数可被省略或为 ``None``。 "
317324
318325#: ../../library/mmap.rst:240
319326msgid ""
320327"Returns a byte at the current file position as an integer, and advances the "
321328"file position by 1."
322- msgstr ""
329+ msgstr "将当前文件位置上的一个字节以整数形式返回,并让文件位置前进 1。 "
323330
324331#: ../../library/mmap.rst:246
325332msgid ""
326333"Returns a single line, starting at the current file position and up to the "
327334"next newline. The file position is updated to point after the bytes that "
328335"were returned."
329- msgstr ""
336+ msgstr "返回一个单独的行,从当前文件位置开始直到下一个换行符。 文件位置会被更新为返回字节数据之后的位置。 "
330337
331338#: ../../library/mmap.rst:253
332339msgid ""
333340"Resizes the map and the underlying file, if any. If the mmap was created "
334341"with :const:`ACCESS_READ` or :const:`ACCESS_COPY`, resizing the map will "
335342"raise a :exc:`TypeError` exception."
336343msgstr ""
344+ "改变映射以及下层文件的大小,如果存在的话。 如果 mmap 创建时设置了 :const:`ACCESS_READ` 或 "
345+ ":const:`ACCESS_COPY`,则改变映射大小将引发 :exc:`TypeError` 异常。"
337346
338347#: ../../library/mmap.rst:260
339348msgid ""
@@ -342,6 +351,8 @@ msgid ""
342351"arguments *start* and *end* are interpreted as in slice notation. Returns "
343352"``-1`` on failure."
344353msgstr ""
354+ "返回子序列 *sub* 在对象内被找到的最大索引号,使得 *sub* 被包含在 [*start*, *end*] 范围中。 可选参数 *start* 和"
355+ " *end* 会被解读为切片表示法。 如果未找到则返回 ``-1``。"
345356
346357#: ../../library/mmap.rst:271
347358msgid ""
@@ -350,16 +361,18 @@ msgid ""
350361"``os.SEEK_CUR`` or ``1`` (seek relative to the current position) and "
351362"``os.SEEK_END`` or ``2`` (seek relative to the file's end)."
352363msgstr ""
364+ "设置文件的当前位置。 *whence* 参数为可选项并且默认为 ``os.SEEK_SET`` 或 ``0`` (绝对文件定位);其他值还有 "
365+ "``os.SEEK_CUR`` 或 ``1`` (相对当前位置查找) 和 ``os.SEEK_END`` 或 ``2`` (相对文件末尾查找)。"
353366
354367#: ../../library/mmap.rst:279
355368msgid ""
356369"Return the length of the file, which can be larger than the size of the "
357370"memory-mapped area."
358- msgstr ""
371+ msgstr "返回文件的长度,该数值可以大于内存映射区域的大小。 "
359372
360373#: ../../library/mmap.rst:285
361374msgid "Returns the current position of the file pointer."
362- msgstr ""
375+ msgstr "返回文件指针的当前位置。 "
363376
364377#: ../../library/mmap.rst:290
365378msgid ""
0 commit comments