Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37a9196

Browse files
sync with cpython 58fdd15d
1 parente315dd5 commit37a9196

File tree

1 file changed

+64
-55
lines changed

1 file changed

+64
-55
lines changed

‎library/array.po

Lines changed: 64 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version:Python 3.12\n"
1313
"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"
1515
"PO-Revision-Date:2021-11-23 18:40+0800\n"
1616
"Last-Translator:Benson Chen <bc842017@gmail.com>\n"
1717
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -241,27 +241,31 @@ msgid "The module defines the following type:"
241241
msgstr"這個模組定義了下方的型別:"
242242

243243
#:../../library/array.rst:78
244+
#,fuzzy
244245
msgid""
245246
"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."
248250
msgstr""
249251
"一個新的陣列中的元素被 *typecode* 限制,並由選用的 *initializer* 參數初始"
250252
"化,\\ *initializer* 必須是一個 list、\\ :term:`bytes-like object`\\ (類位元"
251253
"組串物件)或包含適當型別變數的可疊代物件 (iterable)。"
252254

253255
#:../../library/array.rst:83
256+
#,fuzzy
254257
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."
259263
msgstr""
260264
"如果指定一個 list 或 string,新的陣列初始化時會傳入 :meth:`fromlist`\\\\ :"
261265
"meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其"
262266
"他情況時, 一個 iterable initializer 將被傳入 :meth:`extend` 方法之中。"
263267

264-
#:../../library/array.rst:88
268+
#:../../library/array.rst:90
265269
msgid""
266270
"Array objects support the ordinary sequence operations of indexing, slicing, "
267271
"concatenation, and multiplication. When using slice assignment, the "
@@ -276,27 +280,27 @@ msgstr ""
276280
"實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects <bytes-like "
277281
"object>` 的地方使用。"
278282

279-
#:../../library/array.rst:94
283+
#:../../library/array.rst:96
280284
msgid""
281285
"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
282286
"``typecode``, ``initializer``."
283287
msgstr""
284288
"引發\\ :ref:`稽核事件 (auditing event) <auditing>` ``array.__new__`` 並帶入引"
285289
"數 ``typecode``\\\\ ``initializer``\\。"
286290

287-
#:../../library/array.rst:99
291+
#:../../library/array.rst:101
288292
msgid"The typecode character used to create the array."
289293
msgstr"typecode 字元被用在建立陣列時。"
290294

291-
#:../../library/array.rst:104
295+
#:../../library/array.rst:106
292296
msgid"The length in bytes of one array item in the internal representation."
293297
msgstr"陣列當中的一個元素在內部需要的位元組長度。"
294298

295-
#:../../library/array.rst:109
299+
#:../../library/array.rst:111
296300
msgid"Append a new item with value *x* to the end of the array."
297301
msgstr"新增一個元素 *x* 到陣列的最尾端。"
298302

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

316-
#:../../library/array.rst:124
320+
#:../../library/array.rst:126
317321
msgid""
318322
"When using array objects from code written in C or C++ (the only way to "
319323
"effectively make use of this information), it makes more sense to use the "
@@ -325,7 +329,7 @@ msgstr ""
325329
"適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在"
326330
"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`\\ 。"
327331

328-
#:../../library/array.rst:133
332+
#:../../library/array.rst:135
329333
msgid""
330334
"\"Byteswap\" all items of the array. This is only supported for values "
331335
"which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:"
@@ -336,11 +340,11 @@ msgstr ""
336340
"列,其他型別的值會導致 :exc:`RuntimeError`\\ 。這在從機器讀取位元順序不同的檔"
337341
"案時很有用。"
338342

339-
#:../../library/array.rst:141
343+
#:../../library/array.rst:143
340344
msgid"Return the number of occurrences of *x* in the array."
341345
msgstr"回傳 *x* 在陣列中出現了幾次。"
342346

343-
#:../../library/array.rst:146
347+
#:../../library/array.rst:148
344348
msgid""
345349
"Append items from *iterable* to the end of the array. If *iterable* is "
346350
"another array, it must have *exactly* the same type code; if not, :exc:"
@@ -352,20 +356,21 @@ msgstr ""
352356
"是一個陣列,它必須可以被疊代 (iterable) 且其中的元素必須是可以被加入陣列中的"
353357
"正確型別。"
354358

355-
#:../../library/array.rst:154
359+
#:../../library/array.rst:156
360+
#,fuzzy
356361
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 ofmachine values (as if it had been read from a file using the :"
364+
"meth:`fromfile` method)."
360365
msgstr""
361366
"從字串中新增元素。讀取時會將字串當作一個機器數值組成的陣列(就像從檔案中使"
362367
"用 :meth:`fromfile` 方法讀出的資料)。"
363368

364-
#:../../library/array.rst:157
369+
#:../../library/array.rst:160
365370
msgid":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity."
366371
msgstr"將 :meth:`!fromstring` 更名為 :meth:`frombytes`\\ ,使其更加清晰易懂。"
367372

368-
#:../../library/array.rst:163
373+
#:../../library/array.rst:166
369374
msgid""
370375
"Read *n* items (as machine values) from the :term:`file object` *f* and "
371376
"append them to the end of the array. If less than *n* items are available, :"
@@ -376,26 +381,27 @@ msgstr ""
376381
"入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`\\ ,但有"
377382
"效的元素仍然會被加入陣列中。"
378383

379-
#:../../library/array.rst:171
384+
#:../../library/array.rst:174
380385
msgid""
381386
"Append items from the list. This is equivalent to ``for x in list: a."
382387
"append(x)`` except that if there is a type error, the array is unchanged."
383388
msgstr""
384389
"從 list 中新增元素。這等價於 ``for x in list: a.append(x)``\\ ,除了有型別錯"
385390
"誤產生時,陣列會保持原狀不會被更改。"
386391

387-
#:../../library/array.rst:177
392+
#:../../library/array.rst:180
393+
#,fuzzy
388394
msgid""
389-
"Extends this array with data from the givenunicode string. The array must "
390-
"be atype ``'u'`` array; otherwise a :exc:`ValueError` is raised.Use "
391-
"``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to an "
392-
"array ofsome other type."
395+
"Extends this array with data from the givenUnicode string. The array must "
396+
"havetypecode``'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."
393399
msgstr""
394400
"用給定的 unicode 字串擴展這個陣列。陣列必須是 ``u`` 型別的陣列;其他的型別會"
395401
"導致 :exc:`ValueError` 錯誤。使用 ``array.frombytes(unicodestring."
396402
"encode(enc))`` 來新增 Unicode 資料到一個其他型別的陣列。"
397403

398-
#:../../library/array.rst:185
404+
#:../../library/array.rst:188
399405
msgid""
400406
"Return the smallest *i* such that *i* is the index of the first occurrence "
401407
"of *x* in the array. The optional arguments *start* and *stop* can be "
@@ -406,17 +412,17 @@ msgstr ""
406412
"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*\\ 。如果 *x* 不存"
407413
"在將導致 :exc:`ValueError`\\ 。"
408414

409-
#:../../library/array.rst:190
415+
#:../../library/array.rst:193
410416
msgid"Added optional *start* and *stop* parameters."
411417
msgstr"新增選擇性的參數 *start* 及 *stop*\\ 。"
412418

413-
#:../../library/array.rst:196
419+
#:../../library/array.rst:199
414420
msgid""
415421
"Insert a new item with value *x* in the array before position *i*. Negative "
416422
"values are treated as being relative to the end of the array."
417423
msgstr"在位置 *i* 之前插入一個元素 *x*\\ 。負數的索引值會從陣列尾端開始數。"
418424

419-
#:../../library/array.rst:202
425+
#:../../library/array.rst:205
420426
msgid""
421427
"Removes the item with the index *i* from the array and returns it. The "
422428
"optional argument defaults to ``-1``, so that by default the last item is "
@@ -425,15 +431,15 @@ msgstr ""
425431
"移除並回傳陣列索引值 *i* 的元素。選擇性的引數 *i* 預設為 ``-1``\\ ,所以預設"
426432
"會刪除並回傳最後一個元素。"
427433

428-
#:../../library/array.rst:209
434+
#:../../library/array.rst:212
429435
msgid"Remove the first occurrence of *x* from the array."
430436
msgstr"從陣列中刪除第一個出現的 *x*\\ 。"
431437

432-
#:../../library/array.rst:214
438+
#:../../library/array.rst:217
433439
msgid"Reverse the order of the items in the array."
434440
msgstr"反轉陣列中元素的順序。"
435441

436-
#:../../library/array.rst:219
442+
#:../../library/array.rst:222
437443
msgid""
438444
"Convert the array to an array of machine values and return the bytes "
439445
"representation (the same sequence of bytes that would be written to a file "
@@ -442,37 +448,40 @@ msgstr ""
442448
"將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` "
443449
"方法寫入檔案時的位元序列相同)。"
444450

445-
#:../../library/array.rst:223
451+
#:../../library/array.rst:226
446452
msgid":meth:`!tostring` is renamed to :meth:`tobytes` for clarity."
447453
msgstr"為了明確性,過去的 :meth:`!tostring` 已更名為 :meth:`tobytes`\\ 。"
448454

449-
#:../../library/array.rst:229
455+
#:../../library/array.rst:232
450456
msgid"Write all items (as machine values) to the :term:`file object` *f*."
451457
msgstr"將所有元素(作為機器數值)寫入 :term:`file object` *f*\\ 。"
452458

453-
#:../../library/array.rst:234
459+
#:../../library/array.rst:237
454460
msgid"Convert the array to an ordinary list with the same items."
455461
msgstr"不更改元素,將陣列轉為一般的 list。"
456462

457-
#:../../library/array.rst:239
463+
#:../../library/array.rst:242
464+
#,fuzzy
458465
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."
462469
msgstr""
463470
"將陣列轉為一個字串。陣列的型別必須為 ``u``\\ 。其他型別的陣列會導致 :exc:"
464471
"`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型別的陣列轉為"
465472
"字串。"
466473

467-
#:../../library/array.rst:244
474+
#:../../library/array.rst:247
475+
#,fuzzy
468476
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 itis 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 aUnicodestring if the *typecode* is ``'u'``, otherwise it "
480+
"is a list of numbers. The string representation is guaranteed to be able to "
473481
"be converted back to an array with the same type and value using :func:"
474482
"`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::"
476485
msgstr""
477486
"當一個陣列物件被列印或轉換成字串時,它會被表示為 ``array(typecode, "
478487
"initializer)``\\ 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 "
@@ -482,31 +491,31 @@ msgstr ""
482491
"\n"
483492
"::"
484493

485-
#:../../library/array.rst:261
494+
#:../../library/array.rst:268
486495
msgid"Module :mod:`struct`"
487496
msgstr":mod:`struct` 模組"
488497

489-
#:../../library/array.rst:261
498+
#:../../library/array.rst:268
490499
msgid"Packing and unpacking of heterogeneous binary data."
491500
msgstr"將包含不同資料類型的二進位資料包裝與解開包裝。"
492501

493-
#:../../library/array.rst:265
502+
#:../../library/array.rst:272
494503
msgid"Module :mod:`xdrlib`"
495504
msgstr":mod:`xdrlib` 模組"
496505

497-
#:../../library/array.rst:264
506+
#:../../library/array.rst:271
498507
msgid""
499508
"Packing and unpacking of External Data Representation (XDR) data as used in "
500509
"some remote procedure call systems."
501510
msgstr""
502511
"將 External Data Representation (XDR) 的資料包裝與解開包裝,這用在一些遠端操"
503512
"作的系統 (remote procedure call systems)。"
504513

505-
#:../../library/array.rst:267
514+
#:../../library/array.rst:274
506515
msgid"`NumPy <https://numpy.org/>`_"
507516
msgstr"`NumPy <https://numpy.org/>`_"
508517

509-
#:../../library/array.rst:268
518+
#:../../library/array.rst:275
510519
msgid"The NumPy package defines another array type."
511520
msgstr"NumPy 套件定義了另一個陣列型別"
512521

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp