@@ -10,7 +10,7 @@ msgid ""
10
10
msgstr ""
11
11
"Project-Id-Version : Python 3.13\n "
12
12
"Report-Msgid-Bugs-To : \n "
13
- "POT-Creation-Date : 2024-09-23 07:52+0800 \n "
13
+ "POT-Creation-Date : 2025-07-30 00:18+0000 \n "
14
14
"PO-Revision-Date : 2021-11-23 18:40+0800\n "
15
15
"Last-Translator : Benson Chen <bc842017@gmail.com>\n "
16
16
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -123,6 +123,10 @@ msgstr "Py_UCS4"
123
123
msgid "4"
124
124
msgstr "4"
125
125
126
+ #: ../../library/array.rst:27
127
+ msgid "\\ (2)"
128
+ msgstr ""
129
+
126
130
#: ../../library/array.rst:29
127
131
msgid "``'h'``"
128
132
msgstr "``'h'``"
@@ -230,7 +234,7 @@ msgstr ""
230
234
msgid "Please migrate to ``'w'`` typecode."
231
235
msgstr ""
232
236
233
- #: ../../library/array.rst:64
237
+ #: ../../library/array.rst:67
234
238
msgid ""
235
239
"The actual representation of values is determined by the machine "
236
240
"architecture (strictly speaking, by the C implementation). The actual size "
@@ -239,30 +243,30 @@ msgstr ""
239
243
"實際上數值的表示方法是被機器的架構所決定(更精準地說,被 C 的實作方法決定)。"
240
244
"實際的大小可以透過 :attr:`array.itemsize` 屬性存取。"
241
245
242
- #: ../../library/array.rst:68
246
+ #: ../../library/array.rst:71
243
247
msgid "The module defines the following item:"
244
248
msgstr "這個模組定義了以下項目:"
245
249
246
- #: ../../library/array.rst:73
250
+ #: ../../library/array.rst:76
247
251
msgid "A string with all available type codes."
248
252
msgstr "一個包含所有可用的 type codes 的字串。"
249
253
250
- #: ../../library/array.rst:76
254
+ #: ../../library/array.rst:79
251
255
msgid "The module defines the following type:"
252
256
msgstr "這個模組定義了下方的型別:"
253
257
254
- #: ../../library/array.rst:81
258
+ #: ../../library/array.rst:84
255
259
msgid ""
256
260
"A new array whose items are restricted by *typecode*, and initialized from "
257
- "the optional *initializer* value, which must be a :class:`bytes` "
258
- "or :class: `bytearray` object, a Unicode string, or iterable over elements of "
259
- "the appropriate type."
261
+ "the optional *initializer* value, which must be a :class:`bytes` or :class: "
262
+ "`bytearray` object, a Unicode string, or iterable over elements of the "
263
+ "appropriate type."
260
264
msgstr ""
261
265
"一個新的陣列中的元素被 *typecode* 限制,並由選用的 *initializer* 參數初始化,"
262
266
"*initializer* 必須是一個 :class:`bytes` 或 :class:`bytearray` 物件、一個 "
263
267
"Unicode 字串或包含適當型別元素的可疊代物件 (iterable)。"
264
268
265
- #: ../../library/array.rst:86
269
+ #: ../../library/array.rst:89
266
270
msgid ""
267
271
"If given a :class:`bytes` or :class:`bytearray` object, the initializer is "
268
272
"passed to the new array's :meth:`frombytes` method; if given a Unicode "
@@ -275,7 +279,7 @@ msgstr ""
275
279
"方法;其他情況時, 一個 initializer 的可疊代物件將被傳入 :meth:`extend` 方法"
276
280
"之中來將初始項目新增至陣列。"
277
281
278
- #: ../../library/array.rst:93
282
+ #: ../../library/array.rst:96
279
283
msgid ""
280
284
"Array objects support the ordinary sequence operations of indexing, slicing, "
281
285
"concatenation, and multiplication. When using slice assignment, the "
@@ -290,27 +294,27 @@ msgstr ""
290
294
"了緩衝區介面,可以在任何支援 :term:`bytes-like objects <bytes-like object>` "
291
295
"的地方使用。"
292
296
293
- #: ../../library/array.rst:99
297
+ #: ../../library/array.rst:102
294
298
msgid ""
295
299
"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
296
300
"``typecode``, ``initializer``."
297
301
msgstr ""
298
302
"引發\\ :ref:`稽核事件 (auditing event) <auditing>` ``array.__new__`` 並附帶引"
299
303
"數 ``typecode``、``initializer``。"
300
304
301
- #: ../../library/array.rst:104
305
+ #: ../../library/array.rst:107
302
306
msgid "The typecode character used to create the array."
303
307
msgstr "typecode 字元被用在建立陣列時。"
304
308
305
- #: ../../library/array.rst:109
309
+ #: ../../library/array.rst:112
306
310
msgid "The length in bytes of one array item in the internal representation."
307
311
msgstr "陣列當中的一個元素在內部需要的位元組長度。"
308
312
309
- #: ../../library/array.rst:114
313
+ #: ../../library/array.rst:117
310
314
msgid "Append a new item with value *x* to the end of the array."
311
315
msgstr "新增一個元素 *x* 到陣列的最尾端。"
312
316
313
- #: ../../library/array.rst:119
317
+ #: ../../library/array.rst:122
314
318
msgid ""
315
319
"Return a tuple ``(address, length)`` giving the current memory address and "
316
320
"the length in elements of the buffer used to hold array's contents. The "
@@ -327,7 +331,7 @@ msgstr ""
327
331
"用,例如 :c:func:`!ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,"
328
332
"回傳的數值就有效。"
329
333
330
- #: ../../library/array.rst:129
334
+ #: ../../library/array.rst:132
331
335
msgid ""
332
336
"When using array objects from code written in C or C++ (the only way to "
333
337
"effectively make use of this information), it makes more sense to use the "
@@ -339,100 +343,99 @@ msgstr ""
339
343
"適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在"
340
344
"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`。"
341
345
342
- #: ../../library/array.rst:138
346
+ #: ../../library/array.rst:141
343
347
msgid ""
344
348
"\" Byteswap\" all items of the array. This is only supported for values "
345
- "which are 1, 2, 4, or 8 bytes in size; for other types of "
346
- "values, :exc: `RuntimeError` is raised. It is useful when reading data from "
347
- "a file written on a machine with a different byte order."
349
+ "which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc: "
350
+ "`RuntimeError` is raised. It is useful when reading data from a file "
351
+ "written on a machine with a different byte order."
348
352
msgstr ""
349
353
"\" Byteswap\" 所有陣列中的物件。這只有支援物件長度為 1、2、4 或 8 位元組的陣"
350
354
"列,其他型別的值會導致 :exc:`RuntimeError`。這在從機器讀取位元順序不同的檔案"
351
355
"時很有用。"
352
356
353
- #: ../../library/array.rst:146
357
+ #: ../../library/array.rst:149
354
358
msgid "Return the number of occurrences of *x* in the array."
355
359
msgstr "回傳 *x* 在陣列中出現了幾次。"
356
360
357
- #: ../../library/array.rst:151
361
+ #: ../../library/array.rst:154
358
362
msgid ""
359
363
"Append items from *iterable* to the end of the array. If *iterable* is "
360
- "another array, it must have *exactly* the same type code; if "
361
- "not, :exc:`TypeError` will be raised. If *iterable* is not an array, it "
362
- "must be iterable and its elements must be the right type to be appended to "
363
- "the array."
364
+ "another array, it must have *exactly* the same type code; if not, :exc:"
365
+ "`TypeError` will be raised. If *iterable* is not an array, it must be "
366
+ "iterable and its elements must be the right type to be appended to the array."
364
367
msgstr ""
365
368
"從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,它必須有"
366
369
"完全相同的 type code,如果不同會導致 :exc:`TypeError`。如果 *iterable* 不是一"
367
370
"個陣列,它必須可以被疊代 (iterable) 且其中的元素必須是可以被加入陣列中的正確"
368
371
"型別。"
369
372
370
- #: ../../library/array.rst:159
373
+ #: ../../library/array.rst:162
371
374
msgid ""
372
375
"Appends items from the :term:`bytes-like object`, interpreting its content "
373
- "as an array of machine values (as if it had been read from a file using "
374
- "the : meth:`fromfile` method)."
376
+ "as an array of machine values (as if it had been read from a file using the : "
377
+ "meth:`fromfile` method)."
375
378
msgstr ""
376
379
"從 :term:`bytes-like object` 中新增元素。讀取時會將其內容當作一個機器數值組成"
377
380
"的陣列(就像從檔案中使用 :meth:`fromfile` 方法讀出的資料)。"
378
381
379
- #: ../../library/array.rst:163
382
+ #: ../../library/array.rst:166
380
383
msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity."
381
384
msgstr "將 :meth:`!fromstring` 更名為 :meth:`frombytes`,使其更加清晰易懂。"
382
385
383
- #: ../../library/array.rst:169
386
+ #: ../../library/array.rst:172
384
387
msgid ""
385
388
"Read *n* items (as machine values) from the :term:`file object` *f* and "
386
- "append them to the end of the array. If less than *n* items are "
387
- "available, : exc:`EOFError` is raised, but the items that were available are "
388
- "still inserted into the array."
389
+ "append them to the end of the array. If less than *n* items are available, : "
390
+ "exc:`EOFError` is raised, but the items that were available are still "
391
+ "inserted into the array."
389
392
msgstr ""
390
393
"從 :term:`file object` *f* 讀取 *n* 個元素(作為機器數值),接著將這些元素加"
391
394
"入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`,但有效的"
392
395
"元素仍然會被加入陣列中。"
393
396
394
- #: ../../library/array.rst:177
397
+ #: ../../library/array.rst:180
395
398
msgid ""
396
- "Append items from the list. This is equivalent to ``for x in list: "
397
- "a. append(x)`` except that if there is a type error, the array is unchanged."
399
+ "Append items from the list. This is equivalent to ``for x in list: a. "
400
+ "append(x)`` except that if there is a type error, the array is unchanged."
398
401
msgstr ""
399
402
"從 list 中新增元素。這等價於 ``for x in list: a.append(x)``,除了有型別錯誤產"
400
403
"生時,陣列會保持原狀不會被更改。"
401
404
402
- #: ../../library/array.rst:183
405
+ #: ../../library/array.rst:186
403
406
msgid ""
404
407
"Extends this array with data from the given Unicode string. The array must "
405
408
"have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised. "
406
409
"Use ``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to "
407
410
"an array of some other type."
408
411
msgstr ""
409
412
"用給定的 Unicode 字串擴展這個陣列。陣列的 type code 必須是 ``u`` 或 ``'w'``;"
410
- "其他的型別會導致 :exc:`ValueError` 被引發。使用 "
411
- "``array. frombytes(unicodestring.encode(enc))`` 來新增 Unicode 資料到一個其他 "
412
- "型別的陣列 。"
413
+ "其他的型別會導致 :exc:`ValueError` 被引發。使用 ``array. "
414
+ "frombytes(unicodestring.encode(enc))`` 來新增 Unicode 資料到一個其他型別的陣 "
415
+ "列 。"
413
416
414
- #: ../../library/array.rst:191
417
+ #: ../../library/array.rst:194
415
418
msgid ""
416
419
"Return the smallest *i* such that *i* is the index of the first occurrence "
417
420
"of *x* in the array. The optional arguments *start* and *stop* can be "
418
- "specified to search for *x* within a subsection of the array. "
419
- "Raise :exc: `ValueError` if *x* is not found."
421
+ "specified to search for *x* within a subsection of the array. Raise :exc: "
422
+ "`ValueError` if *x* is not found."
420
423
msgstr ""
421
424
"回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的引"
422
425
"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*。如果 *x* 不存在"
423
426
"將導致 :exc:`ValueError`。"
424
427
425
- #: ../../library/array.rst:196
428
+ #: ../../library/array.rst:199
426
429
msgid "Added optional *start* and *stop* parameters."
427
430
msgstr "新增選擇性的參數 *start* 及 *stop*。"
428
431
429
- #: ../../library/array.rst:202
432
+ #: ../../library/array.rst:205
430
433
msgid ""
431
434
"Insert a new item with value *x* in the array before position *i*. Negative "
432
435
"values are treated as being relative to the end of the array."
433
436
msgstr "在位置 *i* 之前插入一個元素 *x*。負數的索引值會從陣列尾端開始數。"
434
437
435
- #: ../../library/array.rst:208
438
+ #: ../../library/array.rst:211
436
439
msgid ""
437
440
"Removes the item with the index *i* from the array and returns it. The "
438
441
"optional argument defaults to ``-1``, so that by default the last item is "
@@ -441,20 +444,20 @@ msgstr ""
441
444
"移除並回傳陣列索引值 *i* 的元素。選擇性的引數 *i* 預設為 ``-1``,所以預設會刪"
442
445
"除並回傳最後一個元素。"
443
446
444
- #: ../../library/array.rst:215
447
+ #: ../../library/array.rst:218
445
448
msgid "Remove the first occurrence of *x* from the array."
446
449
msgstr "從陣列中刪除第一個出現的 *x*。"
447
450
448
- #: ../../library/array.rst:220
451
+ #: ../../library/array.rst:223
449
452
#, fuzzy
450
453
msgid "Remove all elements from the array."
451
454
msgstr "從陣列中刪除第一個出現的 *x*。"
452
455
453
- #: ../../library/array.rst:227
456
+ #: ../../library/array.rst:230
454
457
msgid "Reverse the order of the items in the array."
455
458
msgstr "反轉陣列中元素的順序。"
456
459
457
- #: ../../library/array.rst:232
460
+ #: ../../library/array.rst:235
458
461
msgid ""
459
462
"Convert the array to an array of machine values and return the bytes "
460
463
"representation (the same sequence of bytes that would be written to a file "
@@ -463,31 +466,30 @@ msgstr ""
463
466
"將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` "
464
467
"方法寫入檔案時的位元序列相同)。"
465
468
466
- #: ../../library/array.rst:236
469
+ #: ../../library/array.rst:239
467
470
msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity."
468
471
msgstr "為了明確性,過去的 :meth:`!tostring` 已更名為 :meth:`tobytes`。"
469
472
470
- #: ../../library/array.rst:242
473
+ #: ../../library/array.rst:245
471
474
msgid "Write all items (as machine values) to the :term:`file object` *f*."
472
475
msgstr "將所有元素(作為機器數值)寫入 :term:`file object` *f*。"
473
476
474
- #: ../../library/array.rst:247
477
+ #: ../../library/array.rst:250
475
478
msgid "Convert the array to an ordinary list with the same items."
476
479
msgstr "不更改元素,將陣列轉為一般的 list。"
477
480
478
- #: ../../library/array.rst:252
481
+ #: ../../library/array.rst:255
479
482
#, fuzzy
480
483
msgid ""
481
484
"Convert the array to a Unicode string. The array must have a type ``'u'`` "
482
- "or ``'w'``; otherwise a :exc:`ValueError` is raised. Use "
483
- "``array.tobytes().decode(enc)`` to obtain a Unicode string from an array of "
484
- "some other type."
485
+ "or ``'w'``; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()."
486
+ "decode(enc)`` to obtain a Unicode string from an array of some other type."
485
487
msgstr ""
486
- "將陣列轉為一個 Unicode 字串。陣列的型別必須為 ``u``。其他型別的陣列會導 "
487
- "致 : exc:`ValueError` 錯誤。請使用 ``array.tobytes().decode(enc)`` 來為其他型 "
488
- "別的陣列轉為 Unicode 字串。"
488
+ "將陣列轉為一個 Unicode 字串。陣列的型別必須為 ``u``。其他型別的陣列會導致 : "
489
+ "exc:`ValueError` 錯誤。請使用 ``array.tobytes().decode(enc)`` 來為其他型別的 "
490
+ "陣列轉為 Unicode 字串。"
489
491
490
- #: ../../library/array.rst:257
492
+ #: ../../library/array.rst:260
491
493
#, fuzzy
492
494
msgid ""
493
495
"The string representation of array objects has the form ``array(typecode, "
@@ -503,10 +505,10 @@ msgstr ""
503
505
"陣列物件的字串表示形式為 ``array(typecode, initializer)``。若為空陣列則參數 "
504
506
"*initializer* 被省略,若 *typecode* 是 ``'u'`` 將被表示為 Unicode 字串,其他"
505
507
"情況則被表示為由數字組成的 list。只要 :class:`~array.array` class(類別)透"
506
- "過 ``from array import array`` 的方式引入,便能確保該字串表示能透 "
507
- "過 :func: `eval` 轉換回一個擁有相同型別及數值的陣列。範例: ::"
508
+ "過 ``from array import array`` 的方式引入,便能確保該字串表示能透過 :func: "
509
+ "`eval` 轉換回一個擁有相同型別及數值的陣列。範例: ::"
508
510
509
- #: ../../library/array.rst:269
511
+ #: ../../library/array.rst:272
510
512
#, fuzzy
511
513
msgid ""
512
514
"array('l')\n"
@@ -519,19 +521,19 @@ msgstr ""
519
521
"array('l', [1, 2, 3, 4, 5])\n"
520
522
"array('d', [1.0, 2.0, 3.14, -inf, nan])"
521
523
522
- #: ../../library/array.rst:277
524
+ #: ../../library/array.rst:280
523
525
msgid "Module :mod:`struct`"
524
526
msgstr ":mod:`struct` 模組"
525
527
526
- #: ../../library/array.rst:278
528
+ #: ../../library/array.rst:281
527
529
msgid "Packing and unpacking of heterogeneous binary data."
528
530
msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。"
529
531
530
- #: ../../library/array.rst:280
532
+ #: ../../library/array.rst:283
531
533
msgid "`NumPy <https://numpy.org/>`_"
532
534
msgstr "`NumPy <https://numpy.org/>`_"
533
535
534
- #: ../../library/array.rst:281
536
+ #: ../../library/array.rst:284
535
537
msgid "The NumPy package defines another array type."
536
538
msgstr "NumPy 套件定義了另一個陣列型別"
537
539
0 commit comments