@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version : Python 3.13\n "
13
13
"Report-Msgid-Bugs-To : \n "
14
- "POT-Creation-Date : 2025-07-25 15:00 +0000\n "
14
+ "POT-Creation-Date : 2025-07-31 14:57 +0000\n "
15
15
"PO-Revision-Date : 2025-07-18 19:21+0000\n "
16
16
"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n "
17
17
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -120,6 +120,10 @@ msgstr "Py_UCS4"
120
120
msgid "4"
121
121
msgstr "4"
122
122
123
+ #: ../../library/array.rst:27
124
+ msgid "\\ (2)"
125
+ msgstr "\\ (2)"
126
+
123
127
#: ../../library/array.rst:29
124
128
msgid "``'h'``"
125
129
msgstr "``'h'``"
@@ -227,26 +231,26 @@ msgstr ""
227
231
msgid "Please migrate to ``'w'`` typecode."
228
232
msgstr "请迁移到 ``'w'`` 类型码。"
229
233
230
- #: ../../library/array.rst:64
234
+ #: ../../library/array.rst:67
231
235
msgid ""
232
236
"The actual representation of values is determined by the machine "
233
237
"architecture (strictly speaking, by the C implementation). The actual size "
234
238
"can be accessed through the :attr:`array.itemsize` attribute."
235
239
msgstr "值的实际表示是由机器架构(严格说是由 C 实现)决定的。实际大小可以通过 :attr:`array.itemsize` 属性来访问。"
236
240
237
- #: ../../library/array.rst:68
241
+ #: ../../library/array.rst:71
238
242
msgid "The module defines the following item:"
239
243
msgstr "此模块定义了以下项目:"
240
244
241
- #: ../../library/array.rst:73
245
+ #: ../../library/array.rst:76
242
246
msgid "A string with all available type codes."
243
247
msgstr "一个由所有可用的类型码组成的字符串。"
244
248
245
- #: ../../library/array.rst:76
249
+ #: ../../library/array.rst:79
246
250
msgid "The module defines the following type:"
247
251
msgstr "此模块定义了以下类型:"
248
252
249
- #: ../../library/array.rst:81
253
+ #: ../../library/array.rst:84
250
254
msgid ""
251
255
"A new array whose items are restricted by *typecode*, and initialized from "
252
256
"the optional *initializer* value, which must be a :class:`bytes` or "
@@ -256,7 +260,7 @@ msgstr ""
256
260
"一个由 *typecode* 限定其条目的新数组,并能根据可选的 *initializer* 值来初始化。*initializer* 必须是 "
257
261
":class:`bytes` 或 :class:`bytearray` 对象、Unicode 字符串或元素类型合适的可迭代对象。"
258
262
259
- #: ../../library/array.rst:86
263
+ #: ../../library/array.rst:89
260
264
msgid ""
261
265
"If given a :class:`bytes` or :class:`bytearray` object, the initializer is "
262
266
"passed to the new array's :meth:`frombytes` method; if given a Unicode "
@@ -269,7 +273,7 @@ msgstr ""
269
273
":meth:`fromunicode` 方法;在其他情况下,则将 *initializer* 的迭代器传给 :meth:`extend` "
270
274
"方法以向数组添加初始条目。"
271
275
272
- #: ../../library/array.rst:93
276
+ #: ../../library/array.rst:96
273
277
msgid ""
274
278
"Array objects support the ordinary sequence operations of indexing, slicing,"
275
279
" concatenation, and multiplication. When using slice assignment, the "
@@ -282,27 +286,27 @@ msgstr ""
282
286
":exc:`TypeError`。数组对象也实现了缓冲区接口,可以用于所有支持 :term:`类字节对象 <bytes-like object>` "
283
287
"的场合。"
284
288
285
- #: ../../library/array.rst:99
289
+ #: ../../library/array.rst:102
286
290
msgid ""
287
291
"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
288
292
"``typecode``, ``initializer``."
289
293
msgstr ""
290
294
"引发一个 :ref:`审计事件 <auditing>` ``array.__new__`` 并附带参数 ``typecode``, "
291
295
"``initializer``。"
292
296
293
- #: ../../library/array.rst:104
297
+ #: ../../library/array.rst:107
294
298
msgid "The typecode character used to create the array."
295
299
msgstr "在创建数组时使用的类型码字符。"
296
300
297
- #: ../../library/array.rst:109
301
+ #: ../../library/array.rst:112
298
302
msgid "The length in bytes of one array item in the internal representation."
299
303
msgstr "内部表示中,单个数组项的长度。单位为字节。"
300
304
301
- #: ../../library/array.rst:114
305
+ #: ../../library/array.rst:117
302
306
msgid "Append a new item with value *x* to the end of the array."
303
307
msgstr "添加一个值为 *x* 的新项到数组末尾。"
304
308
305
- #: ../../library/array.rst:119
309
+ #: ../../library/array.rst:122
306
310
msgid ""
307
311
"Return a tuple ``(address, length)`` giving the current memory address and "
308
312
"the length in elements of the buffer used to hold array's contents. The "
@@ -318,7 +322,7 @@ msgstr ""
318
322
" * array.itemsize`` 来计算。工作在需要内存地址的底层(因此天然地不够安全)的 I/O 接口上时,这有时会有用,例如某些 "
319
323
":c:func:`!ioctl` 操作。只要数组还存在,并且没有对其应用过改变长度的操作,则返回的数值就是有效的。"
320
324
321
- #: ../../library/array.rst:129
325
+ #: ../../library/array.rst:132
322
326
msgid ""
323
327
"When using array objects from code written in C or C++ (the only way to "
324
328
"effectively make use of this information), it makes more sense to use the "
@@ -330,7 +334,7 @@ msgstr ""
330
334
"编写的代码中的数组对象时,才能有效利用该信息,但此时,更合理的是,使用数组对象支持的缓冲区接口。因此,该方法的存在仅仅是为了向后兼容性,应避免在新代码中使用。缓冲区接口的文档参见"
331
335
" :ref:`bufferobjects`。"
332
336
333
- #: ../../library/array.rst:138
337
+ #: ../../library/array.rst:141
334
338
msgid ""
335
339
"\" Byteswap\" all items of the array. This is only supported for values "
336
340
"which are 1, 2, 4, or 8 bytes in size; for other types of values, "
@@ -340,11 +344,11 @@ msgstr ""
340
344
"“字节对调”所有数组项。此方法只支持大小为 1, 2, 4 或 8 字节的值;对于其它类型的值将引发 "
341
345
":exc:`RuntimeError`。当要从另一种字节顺序的机器生成的文件中读取数据时,它很有用。"
342
346
343
- #: ../../library/array.rst:146
347
+ #: ../../library/array.rst:149
344
348
msgid "Return the number of occurrences of *x* in the array."
345
349
msgstr "返回 *x* 在数组中的出现次数。"
346
350
347
- #: ../../library/array.rst:151
351
+ #: ../../library/array.rst:154
348
352
msgid ""
349
353
"Append items from *iterable* to the end of the array. If *iterable* is "
350
354
"another array, it must have *exactly* the same type code; if not, "
@@ -355,7 +359,7 @@ msgstr ""
355
359
"将来自 *iterable* 的项添加到数组末尾。如果 *iterable* 是另一个数组,它必须具有 *完全* 相同的类型码;否则将引发 "
356
360
":exc:`TypeError`。如果 *iterable* 不是一个数组,则它必须为可迭代对象且其元素的类型须为可添加到数组的适当类型。"
357
361
358
- #: ../../library/array.rst:159
362
+ #: ../../library/array.rst:162
359
363
msgid ""
360
364
"Appends items from the :term:`bytes-like object`, interpreting its content "
361
365
"as an array of machine values (as if it had been read from a file using the "
@@ -364,11 +368,11 @@ msgstr ""
364
368
"添加来自 :term:`bytes-like object` 的条目,将其内容解读为由机器值组成的数组(就像是使用 :meth:`fromfile` "
365
369
"方法从文件中读取内容一样)。"
366
370
367
- #: ../../library/array.rst:163
371
+ #: ../../library/array.rst:166
368
372
msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity."
369
373
msgstr ":meth:`!fromstring` 被重命名为含义更准确的 :meth:`frombytes`。"
370
374
371
- #: ../../library/array.rst:169
375
+ #: ../../library/array.rst:172
372
376
msgid ""
373
377
"Read *n* items (as machine values) from the :term:`file object` *f* and "
374
378
"append them to the end of the array. If less than *n* items are available, "
@@ -378,14 +382,14 @@ msgstr ""
378
382
"从 :term:`file object` *f* 中读取 *n* 项(视为机器值)并将它们添加到数组末尾。如果可用的项少于 *n* 项,则会引发 "
379
383
":exc:`EOFError`,但可用的项仍然会被加进数组。"
380
384
381
- #: ../../library/array.rst:177
385
+ #: ../../library/array.rst:180
382
386
msgid ""
383
387
"Append items from the list. This is equivalent to ``for x in list: "
384
388
"a.append(x)`` except that if there is a type error, the array is unchanged."
385
389
msgstr ""
386
390
"将来自列表的项添加到数组末尾。等价于 ``for x in list: a.append(x)``,而不同之处在于,若发生类型错误,数组则不会被改变。"
387
391
388
- #: ../../library/array.rst:183
392
+ #: ../../library/array.rst:186
389
393
msgid ""
390
394
"Extends this array with data from the given Unicode string. The array must "
391
395
"have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised. "
@@ -396,7 +400,7 @@ msgstr ""
396
400
":exc:`ValueError`。 请使用 ``array.frombytes(unicodestring.encode(enc))`` 将 "
397
401
"Unicode 数据添加到其他类型的数组。"
398
402
399
- #: ../../library/array.rst:191
403
+ #: ../../library/array.rst:194
400
404
msgid ""
401
405
"Return the smallest *i* such that *i* is the index of the first occurrence "
402
406
"of *x* in the array. The optional arguments *start* and *stop* can be "
@@ -406,55 +410,55 @@ msgstr ""
406
410
"返回以这样的方式找到的最小的 *i*:*i* 为数组中第一个 *x* 的下标。可选参数 *start* 和 *stop* "
407
411
"用于在数组的一个指定的子段中搜索 *x*。如果未找到 *x* 则会引发 :exc:`ValueError`。"
408
412
409
- #: ../../library/array.rst:196
413
+ #: ../../library/array.rst:199
410
414
msgid "Added optional *start* and *stop* parameters."
411
415
msgstr "添加了可选的 *start* 和 *stop* 形参。"
412
416
413
- #: ../../library/array.rst:202
417
+ #: ../../library/array.rst:205
414
418
msgid ""
415
419
"Insert a new item with value *x* in the array before position *i*. Negative "
416
420
"values are treated as being relative to the end of the array."
417
421
msgstr "在数组的位置 *i* 之前插入一个值为 *x* 的新项。负值被视为相对于数组末尾的位置。"
418
422
419
- #: ../../library/array.rst:208
423
+ #: ../../library/array.rst:211
420
424
msgid ""
421
425
"Removes the item with the index *i* from the array and returns it. The "
422
426
"optional argument defaults to ``-1``, so that by default the last item is "
423
427
"removed and returned."
424
428
msgstr "从数组中移除下标为 *i* 的项并将其返回。参数默认值为 ``-1``,因此默认移除并返回末项。"
425
429
426
- #: ../../library/array.rst:215
430
+ #: ../../library/array.rst:218
427
431
msgid "Remove the first occurrence of *x* from the array."
428
432
msgstr "从数组中移除第一个出现的 *x*。"
429
433
430
- #: ../../library/array.rst:220
434
+ #: ../../library/array.rst:223
431
435
msgid "Remove all elements from the array."
432
436
msgstr "从数组中移除所有元素。"
433
437
434
- #: ../../library/array.rst:227
438
+ #: ../../library/array.rst:230
435
439
msgid "Reverse the order of the items in the array."
436
440
msgstr "反转数组中各项的顺序。"
437
441
438
- #: ../../library/array.rst:232
442
+ #: ../../library/array.rst:235
439
443
msgid ""
440
444
"Convert the array to an array of machine values and return the bytes "
441
445
"representation (the same sequence of bytes that would be written to a file "
442
446
"by the :meth:`tofile` method.)"
443
447
msgstr "将数组转换为一个由机器值组成的数组并返回其字节表示(和用 :meth:`tofile` 方法写入文件的字节序列相同)。"
444
448
445
- #: ../../library/array.rst:236
449
+ #: ../../library/array.rst:239
446
450
msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity."
447
451
msgstr ":meth:`!tostring` 被重命名为含义更准确的 :meth:`tobytes`。"
448
452
449
- #: ../../library/array.rst:242
453
+ #: ../../library/array.rst:245
450
454
msgid "Write all items (as machine values) to the :term:`file object` *f*."
451
455
msgstr "将所有项(作为机器值)写入 :term:`file object` *f*。"
452
456
453
- #: ../../library/array.rst:247
457
+ #: ../../library/array.rst:250
454
458
msgid "Convert the array to an ordinary list with the same items."
455
459
msgstr "将数组转换为由相同的项组成的普通列表。"
456
460
457
- #: ../../library/array.rst:252
461
+ #: ../../library/array.rst:255
458
462
msgid ""
459
463
"Convert the array to a Unicode string. The array must have a type ``'u'`` "
460
464
"or ``'w'``; otherwise a :exc:`ValueError` is raised. Use "
@@ -464,7 +468,7 @@ msgstr ""
464
468
"将数组转换为一个 Unicode 字符串。 数组的类型必须为 ``'u'`` 或 ``'w'``;否则将引发 :exc:`ValueError`。 "
465
469
"请使用 ``array.tobytes().decode(enc)`` 来从其他类型的数组获取 Unicode 字符串。"
466
470
467
- #: ../../library/array.rst:257
471
+ #: ../../library/array.rst:260
468
472
msgid ""
469
473
"The string representation of array objects has the form ``array(typecode, "
470
474
"initializer)``. The *initializer* is omitted if the array is empty, "
@@ -481,7 +485,7 @@ msgstr ""
481
485
":class:`~array.array` 类是使用 ``from array import array`` 导入的,该字符串表示形式就保证能使用 "
482
486
":func:`eval` 转换回具有相同类型和值的数组。 如果它包含相应的浮点数值则还必须定义变量 ``inf`` 和 ``nan``。 例如::"
483
487
484
- #: ../../library/array.rst:269
488
+ #: ../../library/array.rst:272
485
489
msgid ""
486
490
"array('l')\n"
487
491
"array('w', 'hello \\ u2641')\n"
@@ -493,19 +497,19 @@ msgstr ""
493
497
"array('l', [1, 2, 3, 4, 5])\n"
494
498
"array('d', [1.0, 2.0, 3.14, -inf, nan])"
495
499
496
- #: ../../library/array.rst:277
500
+ #: ../../library/array.rst:280
497
501
msgid "Module :mod:`struct`"
498
502
msgstr ":mod:`struct` 模块"
499
503
500
- #: ../../library/array.rst:278
504
+ #: ../../library/array.rst:281
501
505
msgid "Packing and unpacking of heterogeneous binary data."
502
506
msgstr "打包和解包异构二进制数据。"
503
507
504
- #: ../../library/array.rst:280
508
+ #: ../../library/array.rst:283
505
509
msgid "`NumPy <https://numpy.org/>`_"
506
510
msgstr "`NumPy <https://numpy.org/>`_"
507
511
508
- #: ../../library/array.rst:281
512
+ #: ../../library/array.rst:284
509
513
msgid "The NumPy package defines another array type."
510
514
msgstr "NumPy 包定义了另一数组类型。"
511
515
0 commit comments