Skip to content
Prev Previous commit
Next Next commit
fix rst syntax render with space
  • Loading branch information
tomatoprinx committed Nov 19, 2021
commit 3f6f381d0e1cdd86acd40ec3f4470588c3f3dfe3
84 changes: 43 additions & 41 deletions library/array.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
# Translators:
# Liang-Bo Wang <me@liang2.tw>, 2016
# 周 忠毅 <rilakcrc35@gmail.com>, 2016
# Adrian Liaw <adrianliaw2000@gmail.com>, 2018
# Benson Chen <bc842017@gmail.com>, 2021
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-26 16:47+0000\n"
"PO-Revision-Date: 2021-11-13 23:09+0800\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"PO-Revision-Date: 2021-11-19 20:37+0800\n"
"Last-Translator: Benson Chen <bc842017@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
Expand All @@ -35,8 +37,8 @@ msgid ""
"following type codes are defined:"
msgstr ""
"這個模組定義了一個物件型別,可以簡潔的表達一個包含基本數值的陣列:字元、整"
"數、浮點數。陣列是一個非常類似 list(串列) 的序列型別,除了陣列會限制儲存的"
"物件型別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型"
"數、浮點數。陣列是一個非常類似 list(串列)的序列型別,除了陣列會限制儲存的物"
"件型別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型"
"別。下面是 type codes 的定義。"

#: ../../library/array.rst:19
Expand Down Expand Up @@ -205,7 +207,7 @@ msgstr "註解:"

#: ../../library/array.rst:51
msgid "It can be 16 bits or 32 bits depending on the platform."
msgstr "根據平台的不同,他有可能是 16 位元 或者 32 位元。"
msgstr "根據平台的不同,他有可能是 16 位元或者 32 位元。"

#: ../../library/array.rst:53
msgid ""
Expand All @@ -214,7 +216,7 @@ msgid ""
"``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3."
msgstr ""
"目前 ``array(‘u’)`` 使用 ``wchar_t`` 取代已棄用的 ``Py_UNICODE`` 作為 C "
"type。 這個異動並沒有影響到他的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` "
"type。這個異動並沒有影響到他的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` "
"即為 ``wchar_t`` 的別名。"

#: ../../library/array.rst:61
Expand All @@ -237,8 +239,8 @@ msgid ""
"object`, or iterable over elements of the appropriate type."
msgstr ""
"一個新的陣列中的元素被 *typecode* 限制,並由選用的 *initializer* 參數初始"
"化, *initializer* 必須是一個 list(串列)、 :term:`bytes-like object` 或包含"
"適當型別變數的 iterable 。"
"化,\\ *initializer* 必須是一個 list、\\ :term:`bytes-like object` 或包含適當"
"型別變數的 iterable。"

#: ../../library/array.rst:75
msgid ""
Expand All @@ -247,17 +249,17 @@ msgid ""
"below) to add initial items to the array. Otherwise, the iterable "
"initializer is passed to the :meth:`extend` method."
msgstr ""
"如果指定一個 list(串列)或 string ,新的陣列初始化時會傳入 :meth:"
"`fromlist` 、 :meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素"
"新增到其中。其他型態的變數則會傳入 :meth:`extend` 方法初始化。"
"如果指定一個 list 或 string,新的陣列初始化時會傳入 :meth:`fromlist`\\ 、\\ :"
"meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其"
"他型態的變數則會傳入 :meth:`extend` 方法初始化。"

#: ../../library/array.rst:80
msgid ""
"Raises an :ref:`auditing event <auditing>` ``array.__new__`` with arguments "
"``typecode``, ``initializer``."
msgstr ""
"引發 :ref:`審核事件(auditing event) <auditing>` ``array.__new__`` 並帶入 "
"``typecode``, ``initializer``."
"引發 :ref:`審核事件 (auditing event) <auditing>` ``array.__new__`` 並帶入引"
"``typecode`` ``initializer``"

#: ../../library/array.rst:84
msgid "A string with all available type codes."
Expand All @@ -272,10 +274,10 @@ msgid ""
"interface, and may be used wherever :term:`bytes-like objects <bytes-like "
"object>` are supported."
msgstr ""
"陣列支援常見的序列操作,包含索引indexing、切片slicing、串接"
"concatenation、相乘multiplication等。當使用切片進行賦值時,賦值的陣列"
"必須具備相同的 type code ,其他型別的數值將導致 :exc:`TypeError` 。陣列同時"
"也實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects <bytes-like "
"陣列支援常見的序列操作,包含索引 (indexing)、切片 (slicing)、串接 "
"(concatenation)、相乘 (multiplication) 等。當使用切片進行賦值時,賦值的陣列必"
"須具備相同的 type code,其他型別的數值將導致 :exc:`TypeError`\\ 。陣列同時也"
"實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects <bytes-like "
"object>` 的地方使用。"

#: ../../library/array.rst:92
Expand Down Expand Up @@ -306,7 +308,7 @@ msgid ""
"it."
msgstr ""
"回傳一個 tuple ``(address, length)`` 表示當前的記憶體位置和陣列儲存元素的緩衝"
"區記憶體長度。緩衝區的長度單位是 bytes ,並可以用 ``array.buffer_info()[1] * "
"區記憶體長度。緩衝區的長度單位是 bytes,並可以用 ``array.buffer_info()[1] * "
"array.itemsize`` 計算得到。這偶爾會在底層操作需要記憶體位置的輸出輸入時很有"
"用,例如 :c:func:`ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,回"
"傳的數值就有效。"
Expand All @@ -319,9 +321,9 @@ msgid ""
"backward compatibility and should be avoided in new code. The buffer "
"interface is documented in :ref:`bufferobjects`."
msgstr ""
"當使用來自 C 或 C++ 程式碼(這是唯一使得這個資訊有效的途徑) 的陣列物件時,更"
"當使用來自 C 或 C++ 程式碼(這是唯一使得這個資訊有效的途徑)的陣列物件時,更"
"適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在"
"新的程式碼中避免。關於緩衝區介面的文件在 :ref:`bufferobjects` 。"
"新的程式碼中避免。關於緩衝區介面的文件在 :ref:`bufferobjects`\\ 。"

#: ../../library/array.rst:130
msgid ""
Expand All @@ -331,8 +333,8 @@ msgid ""
"written on a machine with a different byte order."
msgstr ""
"\"Byteswap\" 所有陣列中的物件。這只有支援物件長度為 1、2、4 或 8 位元組的陣"
"列,其他型別的值會導致 :exc:`RuntimeError` 。這在從機器讀取位元順序不同的檔案"
"時很有用。"
"列,其他型別的值會導致 :exc:`RuntimeError`\\ 。這在從機器讀取位元順序不同的檔"
"案時很有用。"

#: ../../library/array.rst:138
msgid "Return the number of occurrences of *x* in the array."
Expand All @@ -346,9 +348,9 @@ msgid ""
"iterable and its elements must be the right type to be appended to the array."
msgstr ""
"從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,他必須有"
"完全相同的 type code ,如果不同會導致 :exc:`TypeError` 。如果 *iterable* 不是"
"一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的正"
"確型別。"
"完全相同的 type code ,如果不同會導致 :exc:`TypeError`\\ 。如果 *iterable* "
"是一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的"
"正確型別。"

#: ../../library/array.rst:151
msgid ""
Expand All @@ -361,7 +363,7 @@ msgstr ""

#: ../../library/array.rst:154
msgid ":meth:`fromstring` is renamed to :meth:`frombytes` for clarity."
msgstr "為了更明確,之前的 :meth:`fromstring` 被更名為 :meth:`frombytes` 。"
msgstr "為了更明確,之前的 :meth:`fromstring` 被更名為 :meth:`frombytes`\\ 。"

#: ../../library/array.rst:160
msgid ""
Expand All @@ -371,16 +373,16 @@ msgid ""
"inserted into the array."
msgstr ""
"從 :term:`file object` *f* 讀取 *n* 個 machine value 類型的元素,接著將這些元"
"素加入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError` ,但"
"有效的元素仍然會被加入陣列中。"
"素加入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`\\ ,"
"但有效的元素仍然會被加入陣列中。"

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

#: ../../library/array.rst:174
msgid ""
Expand All @@ -402,17 +404,17 @@ msgid ""
msgstr ""
"回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的參"
"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x* 。如果 *x* 不存在"
"將導致 :exc:`ValueError` 。"
"將導致 :exc:`ValueError`\\ 。"

#: ../../library/array.rst:187
msgid "Added optional *start* and *stop* parameters."
msgstr "新增選擇性的參數 *start* 及 *stop* 。"
msgstr "新增選擇性的參數 *start* 及 *stop*\\ 。"

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

#: ../../library/array.rst:198
msgid ""
Expand All @@ -425,7 +427,7 @@ msgstr ""

#: ../../library/array.rst:205
msgid "Remove the first occurrence of *x* from the array."
msgstr "從陣列中刪除第一個出現的 *x* 。"
msgstr "從陣列中刪除第一個出現的 *x*\\ 。"

#: ../../library/array.rst:210
msgid "Reverse the order of the items in the array."
Expand All @@ -442,15 +444,15 @@ msgstr ""

#: ../../library/array.rst:219
msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity."
msgstr "為了明確性,過去的 :meth:`tostring` 已更名為 :meth:`tobytes` 。"
msgstr "為了明確性,過去的 :meth:`tostring` 已更名為 :meth:`tobytes`\\ 。"

#: ../../library/array.rst:225
msgid "Write all items (as machine values) to the :term:`file object` *f*."
msgstr "將所有元素 (以 machine code 的形式)寫入 :term:`file object` *f* 。"
msgstr "將所有元素(以 machine code 的形式)寫入 :term:`file object` *f*\\ 。"

#: ../../library/array.rst:230
msgid "Convert the array to an ordinary list with the same items."
msgstr "不更改元素,將陣列轉為一般的 list(串列)。"
msgstr "不更改元素,將陣列轉為一般的 list。"

#: ../../library/array.rst:235
msgid ""
Expand All @@ -473,10 +475,10 @@ msgid ""
"``from array import array``. Examples::"
msgstr ""
"當一個陣列物件被列印或轉換成字串時,他會被表示為 ``array(typecode, "
"initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 "
"``’u’`` 將被表示為字串,其他情況則被表示為數字 list(串列)。只要 :class:"
"`~array.array` class(類別)透過 ``from array import array`` 的方式引入,使"
"用 :func:`eval` 便能確保其字串被轉換回一個擁有相同型別及數值的陣列。範例:\n"
"initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 "
"``’u’`` 將被表示為字串,其他情況則被表示為數字 list。只要 :class:`~array."
"array` class(類別)透過 ``from array import array`` 的方式引入,使用 :func:"
"`eval` 便能確保其字串被轉換回一個擁有相同型別及數值的陣列。範例:\n"
"\n"
"::"

Expand Down