@@ -11,7 +11,7 @@ msgid ""
11
11
msgstr ""
12
12
"Project-Id-Version :Python 3.12\n "
13
13
"Report-Msgid-Bugs-To :\n "
14
- "POT-Creation-Date :2023-07-24 00:03 +0000\n "
14
+ "POT-Creation-Date :2024-01-22 14:16 +0000\n "
15
15
"PO-Revision-Date :2021-11-23 18:40+0800\n "
16
16
"Last-Translator :Benson Chen <bc842017@gmail.com>\n "
17
17
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -241,27 +241,31 @@ msgid "The module defines the following type:"
241
241
msgstr "這個模組定義了下方的型別:"
242
242
243
243
#: ../../library/array.rst:78
244
+ #, fuzzy
244
245
msgid ""
245
246
"A new array whose items are restricted by *typecode*, and initialized from "
246
- "the optional *initializer* value, which must be a list, a :term:`bytes-like "
247
- "object`, or iterable over elements of the appropriate type."
247
+ "the optional *initializer* value, which must be a :class:`bytes` or :class:"
248
+ "`bytearray` object, a Unicode string, or iterable over elements of the "
249
+ "appropriate type."
248
250
msgstr ""
249
251
"一個新的陣列中的元素被 *typecode* 限制,並由選用的 *initializer* 參數初始"
250
252
"化,\\ *initializer* 必須是一個 list、\\ :term:`bytes-like object`\\ (類位元"
251
253
"組串物件)或包含適當型別變數的可疊代物件 (iterable)。"
252
254
253
255
#: ../../library/array.rst:83
256
+ #, fuzzy
254
257
msgid ""
255
- "If given a list or string, the initializer is passed to the new array's :"
256
- "meth:`fromlist`, :meth:`frombytes`, or :meth:`fromunicode` method (see "
257
- "below) to add initial items to the array. Otherwise, the iterable "
258
- "initializer is passed to the :meth:`extend` method."
258
+ "If given a :class:`bytes` or :class:`bytearray` object, the initializer is "
259
+ "passed to the new array's :meth:`frombytes` method; if given a Unicode "
260
+ "string, the initializer is passed to the :meth:`fromunicode` method; "
261
+ "otherwise, the initializer's iterator is passed to the :meth:`extend` method "
262
+ "to add initial items to the array."
259
263
msgstr ""
260
264
"如果指定一個 list 或 string,新的陣列初始化時會傳入 :meth:`fromlist`\\ 、\\ :"
261
265
"meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其"
262
266
"他情況時, 一個 iterable initializer 將被傳入 :meth:`extend` 方法之中。"
263
267
264
- #: ../../library/array.rst:88
268
+ #: ../../library/array.rst:90
265
269
msgid ""
266
270
"Array objects support the ordinary sequence operations of indexing, slicing, "
267
271
"concatenation, and multiplication. When using slice assignment, the "
@@ -276,27 +280,27 @@ msgstr ""
276
280
"實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects <bytes-like "
277
281
"object>` 的地方使用。"
278
282
279
- #: ../../library/array.rst:94
283
+ #: ../../library/array.rst:96
280
284
msgid ""
281
285
"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
282
286
"``typecode``, ``initializer``."
283
287
msgstr ""
284
288
"引發\\ :ref:`稽核事件 (auditing event) <auditing>` ``array.__new__`` 並帶入引"
285
289
"數 ``typecode``\\ 、\\ ``initializer``\\ 。"
286
290
287
- #: ../../library/array.rst:99
291
+ #: ../../library/array.rst:101
288
292
msgid "The typecode character used to create the array."
289
293
msgstr "typecode 字元被用在建立陣列時。"
290
294
291
- #: ../../library/array.rst:104
295
+ #: ../../library/array.rst:106
292
296
msgid "The length in bytes of one array item in the internal representation."
293
297
msgstr "陣列當中的一個元素在內部需要的位元組長度。"
294
298
295
- #: ../../library/array.rst:109
299
+ #: ../../library/array.rst:111
296
300
msgid "Append a new item with value *x* to the end of the array."
297
301
msgstr "新增一個元素 *x* 到陣列的最尾端。"
298
302
299
- #: ../../library/array.rst:114
303
+ #: ../../library/array.rst:116
300
304
msgid ""
301
305
"Return a tuple ``(address, length)`` giving the current memory address and "
302
306
"the length in elements of the buffer used to hold array's contents. The "
@@ -313,7 +317,7 @@ msgstr ""
313
317
"用,例如 :c:func:`!ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,"
314
318
"回傳的數值就有效。"
315
319
316
- #: ../../library/array.rst:124
320
+ #: ../../library/array.rst:126
317
321
msgid ""
318
322
"When using array objects from code written in C or C++ (the only way to "
319
323
"effectively make use of this information), it makes more sense to use the "
@@ -325,7 +329,7 @@ msgstr ""
325
329
"適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在"
326
330
"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`\\ 。"
327
331
328
- #: ../../library/array.rst:133
332
+ #: ../../library/array.rst:135
329
333
msgid ""
330
334
"\" Byteswap\" all items of the array. This is only supported for values "
331
335
"which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:"
@@ -336,11 +340,11 @@ msgstr ""
336
340
"列,其他型別的值會導致 :exc:`RuntimeError`\\ 。這在從機器讀取位元順序不同的檔"
337
341
"案時很有用。"
338
342
339
- #: ../../library/array.rst:141
343
+ #: ../../library/array.rst:143
340
344
msgid "Return the number of occurrences of *x* in the array."
341
345
msgstr "回傳 *x* 在陣列中出現了幾次。"
342
346
343
- #: ../../library/array.rst:146
347
+ #: ../../library/array.rst:148
344
348
msgid ""
345
349
"Append items from *iterable* to the end of the array. If *iterable* is "
346
350
"another array, it must have *exactly* the same type code; if not, :exc:"
@@ -352,20 +356,21 @@ msgstr ""
352
356
"是一個陣列,它必須可以被疊代 (iterable) 且其中的元素必須是可以被加入陣列中的"
353
357
"正確型別。"
354
358
355
- #: ../../library/array.rst:154
359
+ #: ../../library/array.rst:156
360
+ #, fuzzy
356
361
msgid ""
357
- "Appends items from thestring , interpretingthe string as an array of "
358
- "machine values (as if it had been read from a file using the:meth :"
359
- "`fromfile` method)."
362
+ "Appends items from the:term:`bytes-like object` , interpretingits content "
363
+ "as an array of machine values (as if it had been read from a file using the :"
364
+ "meth: `fromfile` method)."
360
365
msgstr ""
361
366
"從字串中新增元素。讀取時會將字串當作一個機器數值組成的陣列(就像從檔案中使"
362
367
"用 :meth:`fromfile` 方法讀出的資料)。"
363
368
364
- #: ../../library/array.rst:157
369
+ #: ../../library/array.rst:160
365
370
msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity."
366
371
msgstr "將 :meth:`!fromstring` 更名為 :meth:`frombytes`\\ ,使其更加清晰易懂。"
367
372
368
- #: ../../library/array.rst:163
373
+ #: ../../library/array.rst:166
369
374
msgid ""
370
375
"Read *n* items (as machine values) from the :term:`file object` *f* and "
371
376
"append them to the end of the array. If less than *n* items are available, :"
@@ -376,26 +381,27 @@ msgstr ""
376
381
"入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`\\ ,但有"
377
382
"效的元素仍然會被加入陣列中。"
378
383
379
- #: ../../library/array.rst:171
384
+ #: ../../library/array.rst:174
380
385
msgid ""
381
386
"Append items from the list. This is equivalent to ``for x in list: a."
382
387
"append(x)`` except that if there is a type error, the array is unchanged."
383
388
msgstr ""
384
389
"從 list 中新增元素。這等價於 ``for x in list: a.append(x)``\\ ,除了有型別錯"
385
390
"誤產生時,陣列會保持原狀不會被更改。"
386
391
387
- #: ../../library/array.rst:177
392
+ #: ../../library/array.rst:180
393
+ #, fuzzy
388
394
msgid ""
389
- "Extends this array with data from the givenunicode string. The array must "
390
- "be a type ``'u'`` array ; otherwise a :exc:`ValueError` is raised. Use "
391
- "``array. frombytes(unicodestring.encode(enc))`` to append Unicode data to an "
392
- "array of some other type."
395
+ "Extends this array with data from the givenUnicode string. The array must "
396
+ "have typecode ``'u'``; otherwise a :exc:`ValueError` is raised. Use``array. "
397
+ "frombytes(unicodestring.encode(enc))`` to append Unicode data to an array of "
398
+ "some other type."
393
399
msgstr ""
394
400
"用給定的 unicode 字串擴展這個陣列。陣列必須是 ``u`` 型別的陣列;其他的型別會"
395
401
"導致 :exc:`ValueError` 錯誤。使用 ``array.frombytes(unicodestring."
396
402
"encode(enc))`` 來新增 Unicode 資料到一個其他型別的陣列。"
397
403
398
- #: ../../library/array.rst:185
404
+ #: ../../library/array.rst:188
399
405
msgid ""
400
406
"Return the smallest *i* such that *i* is the index of the first occurrence "
401
407
"of *x* in the array. The optional arguments *start* and *stop* can be "
@@ -406,17 +412,17 @@ msgstr ""
406
412
"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*\\ 。如果 *x* 不存"
407
413
"在將導致 :exc:`ValueError`\\ 。"
408
414
409
- #: ../../library/array.rst:190
415
+ #: ../../library/array.rst:193
410
416
msgid "Added optional *start* and *stop* parameters."
411
417
msgstr "新增選擇性的參數 *start* 及 *stop*\\ 。"
412
418
413
- #: ../../library/array.rst:196
419
+ #: ../../library/array.rst:199
414
420
msgid ""
415
421
"Insert a new item with value *x* in the array before position *i*. Negative "
416
422
"values are treated as being relative to the end of the array."
417
423
msgstr "在位置 *i* 之前插入一個元素 *x*\\ 。負數的索引值會從陣列尾端開始數。"
418
424
419
- #: ../../library/array.rst:202
425
+ #: ../../library/array.rst:205
420
426
msgid ""
421
427
"Removes the item with the index *i* from the array and returns it. The "
422
428
"optional argument defaults to ``-1``, so that by default the last item is "
@@ -425,15 +431,15 @@ msgstr ""
425
431
"移除並回傳陣列索引值 *i* 的元素。選擇性的引數 *i* 預設為 ``-1``\\ ,所以預設"
426
432
"會刪除並回傳最後一個元素。"
427
433
428
- #: ../../library/array.rst:209
434
+ #: ../../library/array.rst:212
429
435
msgid "Remove the first occurrence of *x* from the array."
430
436
msgstr "從陣列中刪除第一個出現的 *x*\\ 。"
431
437
432
- #: ../../library/array.rst:214
438
+ #: ../../library/array.rst:217
433
439
msgid "Reverse the order of the items in the array."
434
440
msgstr "反轉陣列中元素的順序。"
435
441
436
- #: ../../library/array.rst:219
442
+ #: ../../library/array.rst:222
437
443
msgid ""
438
444
"Convert the array to an array of machine values and return the bytes "
439
445
"representation (the same sequence of bytes that would be written to a file "
@@ -442,37 +448,40 @@ msgstr ""
442
448
"將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` "
443
449
"方法寫入檔案時的位元序列相同)。"
444
450
445
- #: ../../library/array.rst:223
451
+ #: ../../library/array.rst:226
446
452
msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity."
447
453
msgstr "為了明確性,過去的 :meth:`!tostring` 已更名為 :meth:`tobytes`\\ 。"
448
454
449
- #: ../../library/array.rst:229
455
+ #: ../../library/array.rst:232
450
456
msgid "Write all items (as machine values) to the :term:`file object` *f*."
451
457
msgstr "將所有元素(作為機器數值)寫入 :term:`file object` *f*\\ 。"
452
458
453
- #: ../../library/array.rst:234
459
+ #: ../../library/array.rst:237
454
460
msgid "Convert the array to an ordinary list with the same items."
455
461
msgstr "不更改元素,將陣列轉為一般的 list。"
456
462
457
- #: ../../library/array.rst:239
463
+ #: ../../library/array.rst:242
464
+ #, fuzzy
458
465
msgid ""
459
- "Convert the array to aunicode string. The array mustbe a type ``'u'`` "
460
- "array; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()."
461
- "decode(enc)`` to obtain aunicode string from an array of some other type."
466
+ "Convert the array to aUnicode string. The array musthave a type ``'u'``; "
467
+ "otherwise a :exc:`ValueError` is raised. Use ``array.tobytes().decode(enc)`` "
468
+ "to obtain aUnicode string from an array of some other type."
462
469
msgstr ""
463
470
"將陣列轉為一個字串。陣列的型別必須為 ``u``\\ 。其他型別的陣列會導致 :exc:"
464
471
"`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型別的陣列轉為"
465
472
"字串。"
466
473
467
- #: ../../library/array.rst:244
474
+ #: ../../library/array.rst:247
475
+ #, fuzzy
468
476
msgid ""
469
- "When an array object is printed or converted to a string, it is represented "
470
- "as ``array(typecode, initializer)``. The *initializer* is omitted if the "
471
- "array is empty, otherwise it is a string if the *typecode* is ``'u'``, "
472
- "otherwise it is a list of numbers. The string is guaranteed to be able to "
477
+ "The string representation of array objects has the form ``array(typecode, "
478
+ "initializer)``. The *initializer* is omitted if the array is empty, "
479
+ "otherwise it is aUnicode string if the *typecode* is ``'u'``, otherwise it "
480
+ "is a list of numbers. The string representation is guaranteed to be able to "
473
481
"be converted back to an array with the same type and value using :func:"
474
482
"`eval`, so long as the :class:`~array.array` class has been imported using "
475
- "``from array import array``. Examples::"
483
+ "``from array import array``. Variables ``inf`` and ``nan`` must also be "
484
+ "defined if it contains corresponding floating point values. Examples::"
476
485
msgstr ""
477
486
"當一個陣列物件被列印或轉換成字串時,它會被表示為 ``array(typecode, "
478
487
"initializer)``\\ 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 "
@@ -482,31 +491,31 @@ msgstr ""
482
491
"\n"
483
492
"::"
484
493
485
- #: ../../library/array.rst:261
494
+ #: ../../library/array.rst:268
486
495
msgid "Module :mod:`struct`"
487
496
msgstr ":mod:`struct` 模組"
488
497
489
- #: ../../library/array.rst:261
498
+ #: ../../library/array.rst:268
490
499
msgid "Packing and unpacking of heterogeneous binary data."
491
500
msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。"
492
501
493
- #: ../../library/array.rst:265
502
+ #: ../../library/array.rst:272
494
503
msgid "Module :mod:`xdrlib`"
495
504
msgstr ":mod:`xdrlib` 模組"
496
505
497
- #: ../../library/array.rst:264
506
+ #: ../../library/array.rst:271
498
507
msgid ""
499
508
"Packing and unpacking of External Data Representation (XDR) data as used in "
500
509
"some remote procedure call systems."
501
510
msgstr ""
502
511
"將 External Data Representation (XDR) 的資料包裝與解開包裝,這用在一些遠端操"
503
512
"作的系統 (remote procedure call systems)。"
504
513
505
- #: ../../library/array.rst:267
514
+ #: ../../library/array.rst:274
506
515
msgid "`NumPy <https://numpy.org/>`_"
507
516
msgstr "`NumPy <https://numpy.org/>`_"
508
517
509
- #: ../../library/array.rst:268
518
+ #: ../../library/array.rst:275
510
519
msgid "The NumPy package defines another array type."
511
520
msgstr "NumPy 套件定義了另一個陣列型別"
512
521