Skip to content

Commit d66eab6

Browse files
sync with cpython d61f8b84
1 parent c5fb0c0 commit d66eab6

File tree

1 file changed

+72
-70
lines changed

1 file changed

+72
-70
lines changed

library/array.po

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: Python 3.13\n"
1212
"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"
1414
"PO-Revision-Date: 2021-11-23 18:40+0800\n"
1515
"Last-Translator: Benson Chen <bc842017@gmail.com>\n"
1616
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -123,6 +123,10 @@ msgstr "Py_UCS4"
123123
msgid "4"
124124
msgstr "4"
125125

126+
#: ../../library/array.rst:27
127+
msgid "\\(2)"
128+
msgstr ""
129+
126130
#: ../../library/array.rst:29
127131
msgid "``'h'``"
128132
msgstr "``'h'``"
@@ -230,7 +234,7 @@ msgstr ""
230234
msgid "Please migrate to ``'w'`` typecode."
231235
msgstr ""
232236

233-
#: ../../library/array.rst:64
237+
#: ../../library/array.rst:67
234238
msgid ""
235239
"The actual representation of values is determined by the machine "
236240
"architecture (strictly speaking, by the C implementation). The actual size "
@@ -239,30 +243,30 @@ msgstr ""
239243
"實際上數值的表示方法是被機器的架構所決定(更精準地說,被 C 的實作方法決定)。"
240244
"實際的大小可以透過 :attr:`array.itemsize` 屬性存取。"
241245

242-
#: ../../library/array.rst:68
246+
#: ../../library/array.rst:71
243247
msgid "The module defines the following item:"
244248
msgstr "這個模組定義了以下項目:"
245249

246-
#: ../../library/array.rst:73
250+
#: ../../library/array.rst:76
247251
msgid "A string with all available type codes."
248252
msgstr "一個包含所有可用的 type codes 的字串。"
249253

250-
#: ../../library/array.rst:76
254+
#: ../../library/array.rst:79
251255
msgid "The module defines the following type:"
252256
msgstr "這個模組定義了下方的型別:"
253257

254-
#: ../../library/array.rst:81
258+
#: ../../library/array.rst:84
255259
msgid ""
256260
"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."
260264
msgstr ""
261265
"一個新的陣列中的元素被 *typecode* 限制,並由選用的 *initializer* 參數初始化,"
262266
"*initializer* 必須是一個 :class:`bytes` 或 :class:`bytearray` 物件、一個 "
263267
"Unicode 字串或包含適當型別元素的可疊代物件 (iterable)。"
264268

265-
#: ../../library/array.rst:86
269+
#: ../../library/array.rst:89
266270
msgid ""
267271
"If given a :class:`bytes` or :class:`bytearray` object, the initializer is "
268272
"passed to the new array's :meth:`frombytes` method; if given a Unicode "
@@ -275,7 +279,7 @@ msgstr ""
275279
"方法;其他情況時, 一個 initializer 的可疊代物件將被傳入 :meth:`extend` 方法"
276280
"之中來將初始項目新增至陣列。"
277281

278-
#: ../../library/array.rst:93
282+
#: ../../library/array.rst:96
279283
msgid ""
280284
"Array objects support the ordinary sequence operations of indexing, slicing, "
281285
"concatenation, and multiplication. When using slice assignment, the "
@@ -290,27 +294,27 @@ msgstr ""
290294
"了緩衝區介面,可以在任何支援 :term:`bytes-like objects <bytes-like object>` "
291295
"的地方使用。"
292296

293-
#: ../../library/array.rst:99
297+
#: ../../library/array.rst:102
294298
msgid ""
295299
"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
296300
"``typecode``, ``initializer``."
297301
msgstr ""
298302
"引發\\ :ref:`稽核事件 (auditing event) <auditing>` ``array.__new__`` 並附帶引"
299303
"數 ``typecode``、``initializer``。"
300304

301-
#: ../../library/array.rst:104
305+
#: ../../library/array.rst:107
302306
msgid "The typecode character used to create the array."
303307
msgstr "typecode 字元被用在建立陣列時。"
304308

305-
#: ../../library/array.rst:109
309+
#: ../../library/array.rst:112
306310
msgid "The length in bytes of one array item in the internal representation."
307311
msgstr "陣列當中的一個元素在內部需要的位元組長度。"
308312

309-
#: ../../library/array.rst:114
313+
#: ../../library/array.rst:117
310314
msgid "Append a new item with value *x* to the end of the array."
311315
msgstr "新增一個元素 *x* 到陣列的最尾端。"
312316

313-
#: ../../library/array.rst:119
317+
#: ../../library/array.rst:122
314318
msgid ""
315319
"Return a tuple ``(address, length)`` giving the current memory address and "
316320
"the length in elements of the buffer used to hold array's contents. The "
@@ -327,7 +331,7 @@ msgstr ""
327331
"用,例如 :c:func:`!ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,"
328332
"回傳的數值就有效。"
329333

330-
#: ../../library/array.rst:129
334+
#: ../../library/array.rst:132
331335
msgid ""
332336
"When using array objects from code written in C or C++ (the only way to "
333337
"effectively make use of this information), it makes more sense to use the "
@@ -339,100 +343,99 @@ msgstr ""
339343
"適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在"
340344
"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`。"
341345

342-
#: ../../library/array.rst:138
346+
#: ../../library/array.rst:141
343347
msgid ""
344348
"\"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."
348352
msgstr ""
349353
"\"Byteswap\" 所有陣列中的物件。這只有支援物件長度為 1、2、4 或 8 位元組的陣"
350354
"列,其他型別的值會導致 :exc:`RuntimeError`。這在從機器讀取位元順序不同的檔案"
351355
"時很有用。"
352356

353-
#: ../../library/array.rst:146
357+
#: ../../library/array.rst:149
354358
msgid "Return the number of occurrences of *x* in the array."
355359
msgstr "回傳 *x* 在陣列中出現了幾次。"
356360

357-
#: ../../library/array.rst:151
361+
#: ../../library/array.rst:154
358362
msgid ""
359363
"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."
364367
msgstr ""
365368
"從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,它必須有"
366369
"完全相同的 type code,如果不同會導致 :exc:`TypeError`。如果 *iterable* 不是一"
367370
"個陣列,它必須可以被疊代 (iterable) 且其中的元素必須是可以被加入陣列中的正確"
368371
"型別。"
369372

370-
#: ../../library/array.rst:159
373+
#: ../../library/array.rst:162
371374
msgid ""
372375
"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)."
375378
msgstr ""
376379
"從 :term:`bytes-like object` 中新增元素。讀取時會將其內容當作一個機器數值組成"
377380
"的陣列(就像從檔案中使用 :meth:`fromfile` 方法讀出的資料)。"
378381

379-
#: ../../library/array.rst:163
382+
#: ../../library/array.rst:166
380383
msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity."
381384
msgstr "將 :meth:`!fromstring` 更名為 :meth:`frombytes`,使其更加清晰易懂。"
382385

383-
#: ../../library/array.rst:169
386+
#: ../../library/array.rst:172
384387
msgid ""
385388
"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."
389392
msgstr ""
390393
"從 :term:`file object` *f* 讀取 *n* 個元素(作為機器數值),接著將這些元素加"
391394
"入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`,但有效的"
392395
"元素仍然會被加入陣列中。"
393396

394-
#: ../../library/array.rst:177
397+
#: ../../library/array.rst:180
395398
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."
398401
msgstr ""
399402
"從 list 中新增元素。這等價於 ``for x in list: a.append(x)``,除了有型別錯誤產"
400403
"生時,陣列會保持原狀不會被更改。"
401404

402-
#: ../../library/array.rst:183
405+
#: ../../library/array.rst:186
403406
msgid ""
404407
"Extends this array with data from the given Unicode string. The array must "
405408
"have type code ``'u'`` or ``'w'``; otherwise a :exc:`ValueError` is raised. "
406409
"Use ``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to "
407410
"an array of some other type."
408411
msgstr ""
409412
"用給定的 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+
"。"
413416

414-
#: ../../library/array.rst:191
417+
#: ../../library/array.rst:194
415418
msgid ""
416419
"Return the smallest *i* such that *i* is the index of the first occurrence "
417420
"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."
420423
msgstr ""
421424
"回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的引"
422425
"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*。如果 *x* 不存在"
423426
"將導致 :exc:`ValueError`。"
424427

425-
#: ../../library/array.rst:196
428+
#: ../../library/array.rst:199
426429
msgid "Added optional *start* and *stop* parameters."
427430
msgstr "新增選擇性的參數 *start* 及 *stop*。"
428431

429-
#: ../../library/array.rst:202
432+
#: ../../library/array.rst:205
430433
msgid ""
431434
"Insert a new item with value *x* in the array before position *i*. Negative "
432435
"values are treated as being relative to the end of the array."
433436
msgstr "在位置 *i* 之前插入一個元素 *x*。負數的索引值會從陣列尾端開始數。"
434437

435-
#: ../../library/array.rst:208
438+
#: ../../library/array.rst:211
436439
msgid ""
437440
"Removes the item with the index *i* from the array and returns it. The "
438441
"optional argument defaults to ``-1``, so that by default the last item is "
@@ -441,20 +444,20 @@ msgstr ""
441444
"移除並回傳陣列索引值 *i* 的元素。選擇性的引數 *i* 預設為 ``-1``,所以預設會刪"
442445
"除並回傳最後一個元素。"
443446

444-
#: ../../library/array.rst:215
447+
#: ../../library/array.rst:218
445448
msgid "Remove the first occurrence of *x* from the array."
446449
msgstr "從陣列中刪除第一個出現的 *x*。"
447450

448-
#: ../../library/array.rst:220
451+
#: ../../library/array.rst:223
449452
#, fuzzy
450453
msgid "Remove all elements from the array."
451454
msgstr "從陣列中刪除第一個出現的 *x*。"
452455

453-
#: ../../library/array.rst:227
456+
#: ../../library/array.rst:230
454457
msgid "Reverse the order of the items in the array."
455458
msgstr "反轉陣列中元素的順序。"
456459

457-
#: ../../library/array.rst:232
460+
#: ../../library/array.rst:235
458461
msgid ""
459462
"Convert the array to an array of machine values and return the bytes "
460463
"representation (the same sequence of bytes that would be written to a file "
@@ -463,31 +466,30 @@ msgstr ""
463466
"將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` "
464467
"方法寫入檔案時的位元序列相同)。"
465468

466-
#: ../../library/array.rst:236
469+
#: ../../library/array.rst:239
467470
msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity."
468471
msgstr "為了明確性,過去的 :meth:`!tostring` 已更名為 :meth:`tobytes`。"
469472

470-
#: ../../library/array.rst:242
473+
#: ../../library/array.rst:245
471474
msgid "Write all items (as machine values) to the :term:`file object` *f*."
472475
msgstr "將所有元素(作為機器數值)寫入 :term:`file object` *f*。"
473476

474-
#: ../../library/array.rst:247
477+
#: ../../library/array.rst:250
475478
msgid "Convert the array to an ordinary list with the same items."
476479
msgstr "不更改元素,將陣列轉為一般的 list。"
477480

478-
#: ../../library/array.rst:252
481+
#: ../../library/array.rst:255
479482
#, fuzzy
480483
msgid ""
481484
"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."
485487
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 字串。"
489491

490-
#: ../../library/array.rst:257
492+
#: ../../library/array.rst:260
491493
#, fuzzy
492494
msgid ""
493495
"The string representation of array objects has the form ``array(typecode, "
@@ -503,10 +505,10 @@ msgstr ""
503505
"陣列物件的字串表示形式為 ``array(typecode, initializer)``。若為空陣列則參數 "
504506
"*initializer* 被省略,若 *typecode* 是 ``'u'`` 將被表示為 Unicode 字串,其他"
505507
"情況則被表示為由數字組成的 list。只要 :class:`~array.array` class(類別)透"
506-
"過 ``from array import array`` 的方式引入,便能確保該字串表示能透"
507-
"過 :func:`eval` 轉換回一個擁有相同型別及數值的陣列。範例: ::"
508+
"過 ``from array import array`` 的方式引入,便能確保該字串表示能透過 :func:"
509+
"`eval` 轉換回一個擁有相同型別及數值的陣列。範例: ::"
508510

509-
#: ../../library/array.rst:269
511+
#: ../../library/array.rst:272
510512
#, fuzzy
511513
msgid ""
512514
"array('l')\n"
@@ -519,19 +521,19 @@ msgstr ""
519521
"array('l', [1, 2, 3, 4, 5])\n"
520522
"array('d', [1.0, 2.0, 3.14, -inf, nan])"
521523

522-
#: ../../library/array.rst:277
524+
#: ../../library/array.rst:280
523525
msgid "Module :mod:`struct`"
524526
msgstr ":mod:`struct` 模組"
525527

526-
#: ../../library/array.rst:278
528+
#: ../../library/array.rst:281
527529
msgid "Packing and unpacking of heterogeneous binary data."
528530
msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。"
529531

530-
#: ../../library/array.rst:280
532+
#: ../../library/array.rst:283
531533
msgid "`NumPy <https://numpy.org/>`_"
532534
msgstr "`NumPy <https://numpy.org/>`_"
533535

534-
#: ../../library/array.rst:281
536+
#: ../../library/array.rst:284
535537
msgid "The NumPy package defines another array type."
536538
msgstr "NumPy 套件定義了另一個陣列型別"
537539

0 commit comments

Comments
 (0)