@@ -13,7 +13,7 @@ msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.14\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2026-02-09 14:46 +0000\n "
16+ "POT-Creation-Date : 2026-03-27 14:44 +0000\n "
1717"PO-Revision-Date : 2025-09-16 00:00+0000\n "
1818"Last-Translator : 99 <wh2099@pm.me>, 2026\n "
1919"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -234,26 +234,34 @@ msgstr ""
234234msgid "Please migrate to ``'w'`` typecode."
235235msgstr "请迁移到 ``'w'`` 类型码。"
236236
237- #: ../../library/array.rst:67
237+ #: ../../library/array.rst:68
238+ msgid ""
239+ "The :ref:`ctypes <ctypes-fundamental-data-types>` and :ref:`struct <format-"
240+ "characters>` modules, as well as third-party modules like `numpy "
241+ "<https://numpy.org/doc/stable/reference/arrays.interface.html#object.__array_interface__>`__,"
242+ " use similar -- but slightly different -- type codes."
243+ msgstr ""
244+
245+ #: ../../library/array.rst:74
238246msgid ""
239247"The actual representation of values is determined by the machine "
240248"architecture (strictly speaking, by the C implementation). The actual size "
241249"can be accessed through the :attr:`array.itemsize` attribute."
242250msgstr "值的实际表示是由机器架构(严格说是由 C 实现)决定的。实际大小可以通过 :attr:`array.itemsize` 属性来访问。"
243251
244- #: ../../library/array.rst:71
252+ #: ../../library/array.rst:78
245253msgid "The module defines the following item:"
246254msgstr "此模块定义了以下项目:"
247255
248- #: ../../library/array.rst:76
256+ #: ../../library/array.rst:83
249257msgid "A string with all available type codes."
250258msgstr "一个由所有可用的类型码组成的字符串。"
251259
252- #: ../../library/array.rst:79
260+ #: ../../library/array.rst:86
253261msgid "The module defines the following type:"
254262msgstr "此模块定义了以下类型:"
255263
256- #: ../../library/array.rst:84
264+ #: ../../library/array.rst:91
257265msgid ""
258266"A new array whose items are restricted by *typecode*, and initialized from "
259267"the optional *initializer* value, which must be a :class:`bytes` or "
@@ -263,7 +271,7 @@ msgstr ""
263271"一个由 *typecode* 限定其条目的新数组,并能根据可选的 *initializer* 值来初始化。*initializer* 必须是 "
264272":class:`bytes` 或 :class:`bytearray` 对象、Unicode 字符串或元素类型合适的可迭代对象。"
265273
266- #: ../../library/array.rst:89
274+ #: ../../library/array.rst:96
267275msgid ""
268276"If given a :class:`bytes` or :class:`bytearray` object, the initializer is "
269277"passed to the new array's :meth:`frombytes` method; if given a Unicode "
@@ -276,7 +284,7 @@ msgstr ""
276284":meth:`fromunicode` 方法;在其他情况下,则将 *initializer* 的迭代器传给 :meth:`extend` "
277285"方法以向数组添加初始条目。"
278286
279- #: ../../library/array.rst:96
287+ #: ../../library/array.rst:103
280288msgid ""
281289"Array objects support the ordinary :ref:`mutable <typesseq-mutable>` "
282290":term:`sequence` operations of indexing, slicing, concatenation, and "
@@ -289,27 +297,27 @@ msgstr ""
289297"当使用切片赋值时,所赋的值必须为具有相同类型码的数组对象;在所有其他情况下,都将引发 :exc:`TypeError`。 "
290298"数组对象还实现了缓冲区接口,可以被用于所有支持 :term:`字节型对象 <bytes-like object>` 的场合。"
291299
292- #: ../../library/array.rst:102
300+ #: ../../library/array.rst:109
293301msgid ""
294302"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
295303"``typecode``, ``initializer``."
296304msgstr ""
297305"引发一个 :ref:`审计事件 <auditing>` ``array.__new__`` 并附带参数 ``typecode``, "
298306"``initializer``."
299307
300- #: ../../library/array.rst:107
308+ #: ../../library/array.rst:114
301309msgid "The typecode character used to create the array."
302310msgstr "在创建数组时使用的类型码字符。"
303311
304- #: ../../library/array.rst:112
312+ #: ../../library/array.rst:119
305313msgid "The length in bytes of one array item in the internal representation."
306314msgstr "内部表示中,单个数组项的长度。单位为字节。"
307315
308- #: ../../library/array.rst:117
309- msgid "Append a new item with value *x* to the end of the array."
310- msgstr "添加一个值为 *x* 的新项到数组末尾。 "
316+ #: ../../library/array.rst:124
317+ msgid "Append a new item with the specified value to the end of the array."
318+ msgstr ""
311319
312- #: ../../library/array.rst:122
320+ #: ../../library/array.rst:129
313321msgid ""
314322"Return a tuple ``(address, length)`` giving the current memory address and "
315323"the length in elements of the buffer used to hold array's contents. The "
@@ -325,7 +333,7 @@ msgstr ""
325333"* array.itemsize`` 来计算。工作在需要内存地址的底层(因此天然地不够安全)的 I/O 接口上时,这有时会有用,例如某些 "
326334":c:func:`!ioctl` 操作。只要数组还存在,并且没有对其应用过改变长度的操作,则返回的数值就是有效的。"
327335
328- #: ../../library/array.rst:132
336+ #: ../../library/array.rst:139
329337msgid ""
330338"When using array objects from code written in C or C++ (the only way to "
331339"effectively make use of this information), it makes more sense to use the "
@@ -337,7 +345,7 @@ msgstr ""
337345"编写的代码中的数组对象时,才能有效利用该信息,但此时,更合理的是,使用数组对象支持的缓冲区接口。因此,该方法的存在仅仅是为了向后兼容性,应避免在新代码中使用。缓冲区接口的文档参见"
338346" :ref:`bufferobjects`."
339347
340- #: ../../library/array.rst:141
348+ #: ../../library/array.rst:148
341349msgid ""
342350"\" Byteswap\" all items of the array. This is only supported for values "
343351"which are 1, 2, 4, or 8 bytes in size; for other types of values, "
@@ -347,11 +355,11 @@ msgstr ""
347355"“字节对调”所有数组项。此方法只支持大小为 1, 2, 4 或 8 字节的值;对于其它类型的值将引发 "
348356":exc:`RuntimeError`。当要从另一种字节顺序的机器生成的文件中读取数据时,它很有用。"
349357
350- #: ../../library/array.rst:149
351- msgid "Return the number of occurrences of *x * in the array."
352- msgstr "返回 *x* 在数组中的出现次数。 "
358+ #: ../../library/array.rst:156
359+ msgid "Return the number of occurrences of *value * in the array."
360+ msgstr ""
353361
354- #: ../../library/array.rst:154
362+ #: ../../library/array.rst:161
355363msgid ""
356364"Append items from *iterable* to the end of the array. If *iterable* is "
357365"another array, it must have *exactly* the same type code; if not, "
@@ -362,7 +370,7 @@ msgstr ""
362370"将来自 *iterable* 的项添加到数组末尾。如果 *iterable* 是另一个数组,它必须具有 *完全* 相同的类型码;否则将引发 "
363371":exc:`TypeError`。如果 *iterable* 不是一个数组,则它必须为可迭代对象且其元素的类型须为可添加到数组的适当类型。"
364372
365- #: ../../library/array.rst:162
373+ #: ../../library/array.rst:169
366374msgid ""
367375"Appends items from the :term:`bytes-like object`, interpreting its content "
368376"as an array of machine values (as if it had been read from a file using the "
@@ -371,11 +379,11 @@ msgstr ""
371379"添加来自 :term:`bytes-like object` 的条目,将其内容解读为由机器值组成的数组(就像是使用 :meth:`fromfile` "
372380"方法从文件中读取内容一样)。"
373381
374- #: ../../library/array.rst:166
382+ #: ../../library/array.rst:173
375383msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity."
376384msgstr ":meth:`!fromstring` 被重命名为含义更准确的 :meth:`frombytes`。"
377385
378- #: ../../library/array.rst:172
386+ #: ../../library/array.rst:179
379387msgid ""
380388"Read *n* items (as machine values) from the :term:`file object` *f* and "
381389"append them to the end of the array. If less than *n* items are available, "
@@ -385,14 +393,14 @@ msgstr ""
385393"从 :term:`file object` *f* 中读取 *n* 项(视为机器值)并将它们添加到数组末尾。如果可用的项少于 *n* 项,则会引发 "
386394":exc:`EOFError`,但可用的项仍然会被加进数组。"
387395
388- #: ../../library/array.rst:180
396+ #: ../../library/array.rst:187
389397msgid ""
390398"Append items from the list. This is equivalent to ``for x in list: "
391399"a.append(x)`` except that if there is a type error, the array is unchanged."
392400msgstr ""
393401"将来自列表的项添加到数组末尾。等价于 ``for x in list: a.append(x)``,而不同之处在于,若发生类型错误,数组则不会被改变。"
394402
395- #: ../../library/array.rst:186
403+ #: ../../library/array.rst:193
396404msgid ""
397405"Extends this array with data from the given Unicode string. The array must "
398406"have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised. "
@@ -403,65 +411,63 @@ msgstr ""
403411":exc:`ValueError`。请使用 ``array.frombytes(unicodestring.encode(enc))`` 将 "
404412"Unicode 数据添加到其他类型的数组。"
405413
406- #: ../../library/array.rst:194
414+ #: ../../library/array.rst:201
407415msgid ""
408416"Return the smallest *i* such that *i* is the index of the first occurrence "
409- "of *x * in the array. The optional arguments *start* and *stop* can be "
410- "specified to search for *x * within a subsection of the array. Raise "
411- ":exc:`ValueError` if *x * is not found."
417+ "of *value * in the array. The optional arguments *start* and *stop* can be "
418+ "specified to search for *value * within a subsection of the array. Raise "
419+ ":exc:`ValueError` if *value * is not found."
412420msgstr ""
413- "返回以这样的方式找到的最小的 *i*:*i* 为数组中第一个 *x* 的下标。可选参数 *start* 和 *stop* "
414- "用于在数组的一个指定的子段中搜索 *x*。如果未找到 *x* 则会引发 :exc:`ValueError`。"
415421
416- #: ../../library/array.rst:199
422+ #: ../../library/array.rst:206
417423msgid "Added optional *start* and *stop* parameters."
418424msgstr "添加了可选的 *start* 和 *stop* 形参。"
419425
420- #: ../../library/array.rst:205
426+ #: ../../library/array.rst:212
421427msgid ""
422- "Insert a new item with value *x* in the array before position *i *. Negative "
428+ "Insert a new item * value* in the array before position *index *. Negative "
423429"values are treated as being relative to the end of the array."
424- msgstr "在数组的位置 *i* 之前插入一个值为 *x* 的新项。负值被视为相对于数组末尾的位置。 "
430+ msgstr ""
425431
426- #: ../../library/array.rst:211
432+ #: ../../library/array.rst:218
427433msgid ""
428434"Removes the item with the index *i* from the array and returns it. The "
429435"optional argument defaults to ``-1``, so that by default the last item is "
430436"removed and returned."
431437msgstr "从数组中移除下标为 *i* 的项并将其返回。可选参数默认值为 ``-1``,因此默认移除并返回末项。"
432438
433- #: ../../library/array.rst:218
434- msgid "Remove the first occurrence of *x * from the array."
435- msgstr "从数组中移除第一个出现的 *x*。 "
439+ #: ../../library/array.rst:225
440+ msgid "Remove the first occurrence of *value * from the array."
441+ msgstr ""
436442
437- #: ../../library/array.rst:223
443+ #: ../../library/array.rst:230
438444msgid "Remove all elements from the array."
439445msgstr "从数组中移除所有元素。"
440446
441- #: ../../library/array.rst:230
447+ #: ../../library/array.rst:237
442448msgid "Reverse the order of the items in the array."
443449msgstr "反转数组中各项的顺序。"
444450
445- #: ../../library/array.rst:235
451+ #: ../../library/array.rst:242
446452msgid ""
447453"Convert the array to an array of machine values and return the bytes "
448454"representation (the same sequence of bytes that would be written to a file "
449455"by the :meth:`tofile` method.)"
450456msgstr "将数组转换为一个由机器值组成的数组并返回其字节表示(和用 :meth:`tofile` 方法写入文件的字节序列相同)。"
451457
452- #: ../../library/array.rst:239
458+ #: ../../library/array.rst:246
453459msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity."
454460msgstr ":meth:`!tostring` 被重命名为含义更准确的 :meth:`tobytes`。"
455461
456- #: ../../library/array.rst:245
462+ #: ../../library/array.rst:252
457463msgid "Write all items (as machine values) to the :term:`file object` *f*."
458464msgstr "将所有项(作为机器值)写入 :term:`file object` *f*。"
459465
460- #: ../../library/array.rst:250
466+ #: ../../library/array.rst:257
461467msgid "Convert the array to an ordinary list with the same items."
462468msgstr "将数组转换为由相同的项组成的普通列表。"
463469
464- #: ../../library/array.rst:255
470+ #: ../../library/array.rst:262
465471msgid ""
466472"Convert the array to a Unicode string. The array must have a type ``'u'`` "
467473"or ``'w'``; otherwise a :exc:`ValueError` is raised. Use "
@@ -471,7 +477,7 @@ msgstr ""
471477"将数组转换为一个 Unicode 字符串。数组的类型必须为 ``'u'`` 或 ``'w'``;否则将引发 :exc:`ValueError`。 请使用"
472478" ``array.tobytes().decode(enc)`` 来从其他类型的数组获取 Unicode 字符串。"
473479
474- #: ../../library/array.rst:260
480+ #: ../../library/array.rst:267
475481msgid ""
476482"The string representation of array objects has the form ``array(typecode, "
477483"initializer)``. The *initializer* is omitted if the array is empty, "
@@ -488,7 +494,7 @@ msgstr ""
488494":class:`~array.array` 类是使用 ``from array import array`` 导入的,该字符串表示形式就保证能使用 "
489495":func:`eval` 转换回具有相同类型和值的数组。如果它包含相应的浮点数值则还必须定义变量 ``inf`` 和 ``nan``。例如::"
490496
491- #: ../../library/array.rst:272
497+ #: ../../library/array.rst:279
492498msgid ""
493499"array('l')\n"
494500"array('w', 'hello \\ u2641')\n"
@@ -500,19 +506,19 @@ msgstr ""
500506"array('l', [1, 2, 3, 4, 5])\n"
501507"array('d', [1.0, 2.0, 3.14, -inf, nan])"
502508
503- #: ../../library/array.rst:280
509+ #: ../../library/array.rst:287
504510msgid "Module :mod:`struct`"
505511msgstr ":mod:`struct` 模块"
506512
507- #: ../../library/array.rst:281
513+ #: ../../library/array.rst:288
508514msgid "Packing and unpacking of heterogeneous binary data."
509515msgstr "打包和解包异构二进制数据。"
510516
511- #: ../../library/array.rst:283
517+ #: ../../library/array.rst:290
512518msgid "`NumPy <https://numpy.org/>`_"
513519msgstr "`NumPy <https://numpy.org/>`_"
514520
515- #: ../../library/array.rst:284
521+ #: ../../library/array.rst:291
516522msgid "The NumPy package defines another array type."
517523msgstr "NumPy 包定义了另一数组类型。"
518524
0 commit comments