@@ -16,7 +16,7 @@ msgid ""
1616msgstr ""
1717"Project-Id-Version : Python 3.9\n "
1818"Report-Msgid-Bugs-To : \n "
19- "POT-Creation-Date : 2023-08-18 15:39 +0000\n "
19+ "POT-Creation-Date : 2023-12-01 21:24 +0000\n "
2020"PO-Revision-Date : 2017-02-16 17:48+0000\n "
2121"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023\n "
2222"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -209,7 +209,7 @@ msgstr "注释:"
209209
210210#: ../../library/array.rst:51
211211msgid "It can be 16 bits or 32 bits depending on the platform."
212- msgstr "在不同的平台上,它可能为 16 位或 32 位。"
212+ msgstr "可能为 16 位或 32 位,取决于具体的平台 。"
213213
214214#: ../../library/array.rst:53
215215msgid ""
@@ -237,7 +237,7 @@ msgid ""
237237"the optional *initializer* value, which must be a list, a :term:`bytes-like "
238238"object`, or iterable over elements of the appropriate type."
239239msgstr ""
240- "一个由 *typecode* 限制类型的新数组,并通过可选的 *initializer* 进行初始化 。*initializer* "
240+ "一个由 *typecode* 限定类型的新数组,可由可选的 *initializer* 初始化 。*initializer* "
241241"必须为一个列表、:term:`bytes-like object` 或在合适类型元素上迭代的可迭代对象。"
242242
243243#: ../../library/array.rst:75
@@ -255,8 +255,8 @@ msgid ""
255255"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
256256"``typecode``, ``initializer``."
257257msgstr ""
258- "引发一个 :ref:`审计事件 <auditing>` ``array.__new__`` 附带参数 ``typecode `` 和 "
259- "``initializer ``。"
258+ "引发一个带参数 ``typecode`` 和 ``initializer `` 的 :ref:`审计事件 <auditing>` "
259+ "``array.__new__ ``。"
260260
261261#: ../../library/array.rst:84
262262msgid "A string with all available type codes."
@@ -272,7 +272,7 @@ msgid ""
272272"object>` are supported."
273273msgstr ""
274274"数组对象支持普通的序列操作如索引、切片、拼接和重复等。当使用切片赋值时,所赋的值必须为具有相同类型码的数组对象;所有其他情况都将引发 "
275- ":exc:`TypeError`。数组对象也实现了缓冲区接口,可以用于所有支持 :term:`字节类对象 <bytes-like object>` "
275+ ":exc:`TypeError`。数组对象也实现了缓冲区接口,可以用于所有支持 :term:`类字节对象 <bytes-like object>` "
276276"的场合。"
277277
278278#: ../../library/array.rst:92
@@ -281,11 +281,11 @@ msgstr "以下数据项和方法也受到支持:"
281281
282282#: ../../library/array.rst:96
283283msgid "The typecode character used to create the array."
284- msgstr "在创建数组时指定的类型码字符 。"
284+ msgstr "在创建数组时使用的类型码字符 。"
285285
286286#: ../../library/array.rst:101
287287msgid "The length in bytes of one array item in the internal representation."
288- msgstr "在内部表示中 ,单个数组项的长度, 单位为字节。"
288+ msgstr "内部表示中 ,单个数组项的长度。 单位为字节。"
289289
290290#: ../../library/array.rst:106
291291msgid "Append a new item with value *x* to the end of the array."
@@ -314,8 +314,9 @@ msgid ""
314314"backward compatibility and should be avoided in new code. The buffer "
315315"interface is documented in :ref:`bufferobjects`."
316316msgstr ""
317- "当在 C 或 C++ 编写的代码中使用数组对象时(这是有效使用此类信息的唯一方式),使用数组对象所支持的缓冲区接口更为适宜。 "
318- "此方法仅保留用作向下兼容,应避免在新代码中使用。 缓冲区接口的文档参见 :ref:`bufferobjects`。"
317+ "只有在使用以 C 或 C++ "
318+ "编写的代码中的数组对象时,才能有效利用该信息,但此时,更合理的是,使用数组对象支持的缓冲区接口。因此,该方法的存在仅仅是为了向后兼容性,应避免在新代码中使用。缓冲区接口的文档参见"
319+ " :ref:`bufferobjects`。"
319320
320321#: ../../library/array.rst:130
321322msgid ""
@@ -324,8 +325,8 @@ msgid ""
324325":exc:`RuntimeError` is raised. It is useful when reading data from a file "
325326"written on a machine with a different byte order."
326327msgstr ""
327- "“字节对调”所有数组项。 此方法只支持大小为 1, 2, 4 或 8 字节的值;对于其他值类型将引发 :exc:`RuntimeError`。 "
328- "它适用于从不同字节序机器所生成的文件中读取数据的情况 。"
328+ "“字节对调”所有数组项。此方法只支持大小为 1, 2, 4 或 8 字节的值;对于其它类型的值将引发 "
329+ ":exc:`RuntimeError`。当要从另一种字节顺序的机器生成的文件中读取数据时,它很有用 。"
329330
330331#: ../../library/array.rst:138
331332msgid "Return the number of occurrences of *x* in the array."
@@ -339,15 +340,15 @@ msgid ""
339340"iterable and its elements must be the right type to be appended to the "
340341"array."
341342msgstr ""
342- "将来自 *iterable* 的项添加到数组末尾。 如果 *iterable* 是另一个数组,它必须具有 *完全* 相同的类型码;否则将引发 "
343- ":exc:`TypeError`。 如果 *iterable* 不是一个数组,则它必须为可迭代对象并且其元素必须为可添加到数组的适当类型 。"
343+ "将来自 *iterable* 的项添加到数组末尾。如果 *iterable* 是另一个数组,它必须具有 *完全* 相同的类型码;否则将引发 "
344+ ":exc:`TypeError`。如果 *iterable* 不是一个数组,则它必须为可迭代对象且其元素的类型须为可添加到数组的适当类型 。"
344345
345346#: ../../library/array.rst:151
346347msgid ""
347348"Appends items from the string, interpreting the string as an array of "
348349"machine values (as if it had been read from a file using the "
349350":meth:`fromfile` method)."
350- msgstr "添加来自字节串的项,将字符节解读为机器值的数组(相当于使用 :meth:`fromfile` 方法从文件中读取数据 )。"
351+ msgstr "将来自字节串的项添加到数组末尾,字节串被视为由机器值组成的数组(就像用 :meth:`fromfile` 方法从文件中读取数据一样 )。"
351352
352353#: ../../library/array.rst:154
353354msgid ":meth:`fromstring` is renamed to :meth:`frombytes` for clarity."
@@ -360,15 +361,15 @@ msgid ""
360361":exc:`EOFError` is raised, but the items that were available are still "
361362"inserted into the array."
362363msgstr ""
363- "从 :term:`file object` *f* 中读取 *n* 项并将它们添加到数组末尾。 如果可用数据少于 *n* 项,则会引发 "
364- ":exc:`EOFError`,但可用的项仍然会被插入数组 。"
364+ "从 :term:`file object` *f* 中读取 *n* 项(视为机器值)并将它们添加到数组末尾。如果可用的项少于 *n* 项,则会引发 "
365+ ":exc:`EOFError`,但可用的项仍然会被加进数组 。"
365366
366367#: ../../library/array.rst:168
367368msgid ""
368369"Append items from the list. This is equivalent to ``for x in list: "
369370"a.append(x)`` except that if there is a type error, the array is unchanged."
370371msgstr ""
371- "添加来自 list 的项。 这等价于 ``for x in list: a.append(x)``,区别在于如果发生类型错误,数组将不会被改变 。"
372+ "将来自列表的项添加到数组末尾。等价于 ``for x in list: a.append(x)``,而不同之处在于,若发生类型错误,数组则不会被改变 。"
372373
373374#: ../../library/array.rst:174
374375msgid ""
@@ -377,8 +378,8 @@ msgid ""
377378"``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to an "
378379"array of some other type."
379380msgstr ""
380- "使用来自给定 Unicode 字符串的数组扩展数组。 数组必须是类型为 ``'u'`` 的数组;否则将引发 :exc:`ValueError`。 请使用 "
381- " ``array.frombytes(unicodestring.encode(enc))`` 来将 Unicode 数据添加到其他类型的数组 。"
381+ "将来自 Unicode 字符串的项添加到数组末尾。 数组必须是类型为 ``'u'`` 的数组;否则将引发 :exc:`ValueError`。请用 "
382+ "``array.frombytes(unicodestring.encode(enc))`` 来将 Unicode 数据添加到其它类型的数组 。"
382383
383384#: ../../library/array.rst:182
384385msgid ""
@@ -390,18 +391,18 @@ msgstr "返回最小的 *i* 使得 *i* 为 *x* 在数组中首次出现的序号
390391msgid ""
391392"Insert a new item with value *x* in the array before position *i*. Negative "
392393"values are treated as being relative to the end of the array."
393- msgstr "将值 *x* 作为新项插入数组的 *i* 位置之前。 负值将被视为相对于数组末尾的位置 。"
394+ msgstr "在数组的位置 *i* 之前插入一个值为 *x* 的新项。负值被视为相对于数组末尾的位置 。"
394395
395396#: ../../library/array.rst:194
396397msgid ""
397398"Removes the item with the index *i* from the array and returns it. The "
398399"optional argument defaults to ``-1``, so that by default the last item is "
399400"removed and returned."
400- msgstr "从数组中移除序号为 *i* 的项并将其返回。 可选参数值默认为 ``-1``,因此默认将移除并返回末尾项 。"
401+ msgstr "从数组中移除下标为 *i* 的项并将其返回。参数默认值为 ``-1``,因此默认移除并返回末项 。"
401402
402403#: ../../library/array.rst:201
403404msgid "Remove the first occurrence of *x* from the array."
404- msgstr "从数组中移除首次出现的 *x*。"
405+ msgstr "从数组中移除第一个出现的 *x*。"
405406
406407#: ../../library/array.rst:206
407408msgid "Reverse the order of the items in the array."
@@ -412,19 +413,19 @@ msgid ""
412413"Convert the array to an array of machine values and return the bytes "
413414"representation (the same sequence of bytes that would be written to a file "
414415"by the :meth:`tofile` method.)"
415- msgstr "将数组转换为一个机器值数组并返回其字节表示(即相当与通过 :meth:`tofile` 方法写入到文件的字节序列。) "
416+ msgstr "将数组转换为一个由机器值组成的数组并返回其字节表示(和用 :meth:`tofile` 方法写入文件的字节序列相同)。 "
416417
417418#: ../../library/array.rst:215
418419msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity."
419420msgstr ":meth:`tostring` 被重命名为 :meth:`tobytes` 以使其含义更清晰。"
420421
421422#: ../../library/array.rst:221
422423msgid "Write all items (as machine values) to the :term:`file object` *f*."
423- msgstr "将所有项(作为机器值)写入到 :term:`file object` *f*。"
424+ msgstr "将所有项(作为机器值)写入 :term:`file object` *f*。"
424425
425426#: ../../library/array.rst:226
426427msgid "Convert the array to an ordinary list with the same items."
427- msgstr "将数组转换为包含相同项的普通列表 。"
428+ msgstr "将数组转换为由相同的项组成的普通列表 。"
428429
429430#: ../../library/array.rst:231
430431msgid ""
@@ -433,8 +434,8 @@ msgid ""
433434"``array.tobytes().decode(enc)`` to obtain a unicode string from an array of "
434435"some other type."
435436msgstr ""
436- "将数组转换为一个 Unicode 字符串。 数组必须是类型为 ``'u'`` 的数组;否则将引发 :exc:`ValueError`。 请使用 "
437- "``array.tobytes().decode(enc)`` 来从其他类型的数组生成 Unicode 字符串。"
437+ "将数组转换为一个 Unicode 字符串。数组必须是类型为 ``'u'`` 的数组;否则将引发 :exc:`ValueError`。请用 "
438+ "``array.tobytes().decode(enc)`` 来将其它类型的数组转换为 Unicode 字符串。"
438439
439440#: ../../library/array.rst:236
440441msgid ""
@@ -446,33 +447,33 @@ msgid ""
446447":func:`eval`, so long as the :class:`~array.array` class has been imported "
447448"using ``from array import array``. Examples::"
448449msgstr ""
449- "当一个数组对象被打印或转换为字符串时,它会表示为 ``array(typecode, initializer)``。 如果数组为空则 "
450- "*initializer* 会被省略,否则如果 *typecode* 为 ``'u'`` 则它是一个字符串,否则它是一个数字列表。 使用 "
451- ":func:`eval` 保证能将字符串转换回具有相同类型和值的数组,只要 : class:`~array.array` 类已通过 ``from "
452- "array import array`` 被引入。 例如:: "
450+ "数组对象被打印或转换为字符串时,会被表示为 ``array(typecode, initializer)``。*initializer* "
451+ "在数组为空时会被省略,在数组的 *typecode* 为 ``'u'`` 时是一个字符串,其它时候是一个数字列表。只要 "
452+ ":class:`~array.array` 类已用 ``from array import array`` 引入,该字符串保证能被 "
453+ ":func:`eval` 转换回具有相同类型和值的数组。例: "
453454
454455#: ../../library/array.rst:253
455456msgid "Module :mod:`struct`"
456- msgstr "模块 :mod:`struct`"
457+ msgstr ":mod:`struct` 模块 "
457458
458459#: ../../library/array.rst:253
459460msgid "Packing and unpacking of heterogeneous binary data."
460461msgstr "打包和解包异构二进制数据。"
461462
462463#: ../../library/array.rst:257
463464msgid "Module :mod:`xdrlib`"
464- msgstr "模块 :mod:`xdrlib`"
465+ msgstr ":mod:`xdrlib` 模块 "
465466
466467#: ../../library/array.rst:256
467468msgid ""
468469"Packing and unpacking of External Data Representation (XDR) data as used in "
469470"some remote procedure call systems."
470- msgstr "打包和解包用于某些远程过程调用系统的 External Data Representation (XDR) 数据。"
471+ msgstr "打包和解包某些远程过程调用系统使用的 External Data Representation (XDR) 数据。"
471472
472473#: ../../library/array.rst:259
473474msgid "`NumPy <https://numpy.org/>`_"
474475msgstr "`NumPy <https://numpy.org/>`_"
475476
476477#: ../../library/array.rst:260
477478msgid "The NumPy package defines another array type."
478- msgstr "NumPy 软件包定义了另一种数组类型 。"
479+ msgstr "NumPy 包定义了另一数组类型 。"
0 commit comments