Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions c-api/float.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-18 00:20+0000\n"
"POT-Creation-Date: 2026-03-17 00:20+0000\n"
"PO-Revision-Date: 2025-11-07 05:06+0000\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -274,9 +274,10 @@ msgstr ""
"理,並且嘗試解包包含 IEEE INF 或 NaN 的位元組字串將引發例外。"

#: ../../c-api/float.rst:197
#, fuzzy
msgid ""
"Note that NaNs type may not be preserved on IEEE platforms (signaling NaN "
"become quiet NaN), for example on x86 systems in 32-bit mode."
"Note that NaN type may not be preserved on IEEE platforms (signaling NaNs "
"become quiet NaNs), for example on x86 systems in 32-bit mode."
msgstr ""
"請注意,在 IEEE 平台上可能無法保留 NaN 型別(「訊號型 NaN (signaling NaN)」會"
"變成「安靜型 NaN (quiet NaN)」),例如在 32 位元模式的 x86 系統上。"
Expand All @@ -297,11 +298,12 @@ msgid "Pack functions"
msgstr "打包函式"

#: ../../c-api/float.rst:210
#, fuzzy
msgid ""
"The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:"
"`int` argument, non-zero if you want the bytes string in little-endian "
"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you "
"want big-endian format (exponent first, at *p*). The :c:macro:"
"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` and ``p+7``), zero if "
"you want big-endian format (exponent first, at *p*). The :c:macro:"
"`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal "
"to ``1`` on big endian processor, or ``0`` on little endian processor."
msgstr ""
Expand Down
146 changes: 93 additions & 53 deletions c-api/list.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-23 07:52+0800\n"
"POT-Creation-Date: 2026-03-19 00:23+0000\n"
"PO-Revision-Date: 2025-11-25 22:16+0800\n"
"Last-Translator: Yorkxe <karta25768@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand All @@ -34,8 +34,8 @@ msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
"This is the same object as :class:`list` in the Python layer."
msgstr ""
"此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中"
"的 :class:`list` 是同一個物件。"
"此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中的 :"
"class:`list` 是同一個物件。"

#: ../../c-api/list.rst:24
msgid ""
Expand All @@ -60,18 +60,18 @@ msgstr "成功時回傳長度為 *len* 的新串列,失敗時回傳 ``NULL``
#: ../../c-api/list.rst:40
msgid ""
"If *len* is greater than zero, the returned list object's items are set to "
"``NULL``. Thus you cannot use abstract API functions such "
"as :c:func:`PySequence_SetItem` or expose the object to Python code before "
"setting all items to a real object with :c:func:`PyList_SetItem` "
"or :c:func:`PyList_SET_ITEM()`. The following APIs are safe APIs before the "
"list is fully initialized: :c:func:`PyList_SetItem()` "
"and :c:func:`PyList_SET_ITEM()`."
"``NULL``. Thus you cannot use abstract API functions such as :c:func:"
"`PySequence_SetItem` or expose the object to Python code before setting all "
"items to a real object with :c:func:`PyList_SetItem` or :c:func:"
"`PyList_SET_ITEM()`. The following APIs are safe APIs before the list is "
"fully initialized: :c:func:`PyList_SetItem()` and :c:func:"
"`PyList_SET_ITEM()`."
msgstr ""
"如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使"
"用 :c:func:`PyList_SetItem` 或 :c:func:`PyList_SET_ITEM()` 來將所有項目設定為"
"一個真實物件前,你無法使用像是 :c:func:`PySequence_SetItem` 的抽象 API 函式,"
"也不能將物件暴露 (expose) 給 Python 程式碼。以下 API 在串列完全初始化之前是安"
"全的::c:func:`PyList_SetItem()` 和 :c:func:`PyList_SET_ITEM()`。"
"如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使用 :"
"c:func:`PyList_SetItem` 或 :c:func:`PyList_SET_ITEM()` 來將所有項目設定為一個"
"真實物件前,你無法使用像是 :c:func:`PySequence_SetItem` 的抽象 API 函式,也不"
"能將物件暴露 (expose) 給 Python 程式碼。以下 API 在串列完全初始化之前是安全"
"::c:func:`PyList_SetItem()` 和 :c:func:`PyList_SET_ITEM()`。"

#: ../../c-api/list.rst:53
msgid ""
Expand Down Expand Up @@ -99,14 +99,21 @@ msgid ""
"Like :c:func:`PyList_GetItemRef`, but returns a :term:`borrowed reference` "
"instead of a :term:`strong reference`."
msgstr ""
"與 :c:func:`PyList_GetItemRef` 類似,但回傳一個 :term:`borrowed reference` "
"而非一個 :term:`strong reference`。"
"與 :c:func:`PyList_GetItemRef` 類似,但回傳一個 :term:`borrowed reference` "
"非一個 :term:`strong reference`。"

#: ../../c-api/list.rst:80
#: ../../c-api/list.rst:79 ../../c-api/list.rst:91
msgid ""
"In the :term:`free-threaded build`, the returned :term:`borrowed reference` "
"may become invalid if another thread modifies the list concurrently. Prefer :"
"c:func:`PyList_GetItemRef`, which returns a :term:`strong reference`."
msgstr ""

#: ../../c-api/list.rst:87
msgid "Similar to :c:func:`PyList_GetItem`, but without error checking."
msgstr "與 :c:func:`PyList_GetItem` 類似,但沒有錯誤檢查。"

#: ../../c-api/list.rst:85
#: ../../c-api/list.rst:99
msgid ""
"Set the item at index *index* in list to *item*. Return ``0`` on success. "
"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` "
Expand All @@ -115,42 +122,49 @@ msgstr ""
"將串列中索引 *index* 處的項目設定為 *item*。成功時回傳 ``0``。如果 *index* 超"
"出邊界範圍則回傳 ``-1`` 並設定一個 :exc:`IndexError` 例外。"

#: ../../c-api/list.rst:91
#: ../../c-api/list.rst:105
msgid ""
"This function \"steals\" a reference to *item* and discards a reference to "
"an item already in the list at the affected position."
msgstr "此函式「竊取」對 *item* 的參照,並丟棄對串列中受影響位置上已存在項目的參照。"
msgstr ""
"此函式「竊取」對 *item* 的參照,並丟棄對串列中受影響位置上已存在項目的參照。"

#: ../../c-api/list.rst:97
#: ../../c-api/list.rst:111
msgid ""
"Macro form of :c:func:`PyList_SetItem` without error checking. This is "
"normally only used to fill in new lists where there is no previous content."
msgstr ""
":c:func:`PyList_SetItem` 的巨集形式,沒有錯誤檢查。這通常僅用於填充沒有已存在"
"內容的新串列。"

#: ../../c-api/list.rst:100
#: ../../c-api/list.rst:114
msgid ""
"Bounds checking is performed as an assertion if Python is built "
"in :ref:`debug mode <debug-build>` or :option:`with assertions <--with-"
"assertions>`."
"Bounds checking is performed as an assertion if Python is built in :ref:"
"`debug mode <debug-build>` or :option:`with assertions <--with-assertions>`."
msgstr ""
"如果 Python 是以\\ :ref:`偵錯模式 <debug-build>`\\ 或 "
":option:`with assertions <--with-assertions>` 建置,則會進行作為"
"斷言(asserting)的邊界檢查。"
"如果 Python 是以\\ :ref:`偵錯模式 <debug-build>`\\ 或 :option:`with "
"assertions <--with-assertions>` 建置,則會進行作為斷言(asserting)的邊界檢"
"。"

#: ../../c-api/list.rst:106
#: ../../c-api/list.rst:120
msgid ""
"This macro \"steals\" a reference to *item*, and, "
"unlike :c:func:`PyList_SetItem`, does *not* discard a reference to any item "
"that is being replaced; any reference in *list* at position *i* will be "
"leaked."
"This macro \"steals\" a reference to *item*, and, unlike :c:func:"
"`PyList_SetItem`, does *not* discard a reference to any item that is being "
"replaced; any reference in *list* at position *i* will be leaked."
msgstr ""
"該巨集「竊取」對 *item* 的參照,並且與 :c:func:`PyList_SetItem` 不同的是,它"
"\\ *不會*\\ 丟棄對任意被替換項目的參照;*list* 中位置 *i* 的任何參照都將被洩"
"漏 (leak)。"

#: ../../c-api/list.rst:114
#: ../../c-api/list.rst:127
msgid ""
"In the :term:`free-threaded build`, this macro has no internal "
"synchronization. It is normally only used to fill in new lists where no "
"other thread has a reference to the list. If the list may be shared, use :c:"
"func:`PyList_SetItem` instead, which uses a :term:`per-object lock`."
msgstr ""

#: ../../c-api/list.rst:136
msgid ""
"Insert the item *item* into list *list* in front of index *index*. Return "
"``0`` if successful; return ``-1`` and set an exception if unsuccessful. "
Expand All @@ -160,7 +174,7 @@ msgstr ""
"``0``;如果失敗則回傳 ``-1`` 並設定例外。類似於 ``list.insert(index, "
"item)``。"

#: ../../c-api/list.rst:121
#: ../../c-api/list.rst:143
msgid ""
"Append the object *item* at the end of list *list*. Return ``0`` if "
"successful; return ``-1`` and set an exception if unsuccessful. Analogous "
Expand All @@ -169,7 +183,7 @@ msgstr ""
"將物件 *item* 附加到串列 *list* 的最後面。如果成功則回傳 ``0``;如果不成功,"
"則回傳 ``-1`` 並設定例外。類似於 ``list.append(item)``。"

#: ../../c-api/list.rst:128
#: ../../c-api/list.rst:150
msgid ""
"Return a list of the objects in *list* containing the objects *between* "
"*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. "
Expand All @@ -180,7 +194,7 @@ msgstr ""
"成功則回傳 ``NULL`` 並設定例外。類似於 ``list[low:high]``。不支援從串列尾末開"
"始索引。"

#: ../../c-api/list.rst:135
#: ../../c-api/list.rst:157
msgid ""
"Set the slice of *list* between *low* and *high* to the contents of "
"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may "
Expand All @@ -193,56 +207,82 @@ msgstr ""
"(切片刪除)。成功時回傳 ``0``,失敗時則回傳 ``-1``。不支援從串列尾末開始索"
"引。"

#: ../../c-api/list.rst:144
#: ../../c-api/list.rst:165
msgid ""
"In the :term:`free-threaded build`, when *itemlist* is a :class:`list`, both "
"*list* and *itemlist* are locked for the duration of the operation. For "
"other iterables (or ``NULL``), only *list* is locked."
msgstr ""

#: ../../c-api/list.rst:172
msgid ""
"Extend *list* with the contents of *iterable*. This is the same as "
"``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and "
"analogous to ``list.extend(iterable)`` or ``list += iterable``."
msgstr ""
"以 *iterable* 中的內容擴展 *list*。這與 ``PyList_SetSlice(list, "
"PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` 相同,類似於 "
"``list.extend(iterable)`` 或 ``list += iterable``。"
"PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` 相同,類似於 ``list."
"extend(iterable)`` 或 ``list += iterable``。"

#: ../../c-api/list.rst:148
#: ../../c-api/list.rst:176
msgid ""
"Raise an exception and return ``-1`` if *list* is not a :class:`list` "
"object. Return 0 on success."
msgstr ""
"引發一個例外並回傳 ``-1`` 如果 *list* 不是一個 :class:`list` 物件。如果成功回"
"傳 0。"

#: ../../c-api/list.rst:156
#: ../../c-api/list.rst:183
msgid ""
"In the :term:`free-threaded build`, when *iterable* is a :class:`list`, :"
"class:`set`, :class:`dict`, or dict view, both *list* and *iterable* (or its "
"underlying dict) are locked for the duration of the operation. For other "
"iterables, only *list* is locked; *iterable* may be concurrently modified by "
"another thread."
msgstr ""

#: ../../c-api/list.rst:192
msgid ""
"Remove all items from *list*. This is the same as ``PyList_SetSlice(list, "
"0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del "
"list[:]``."
msgstr "移除 *list* 中的所有項目。這與 ``PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, "
msgstr ""
"移除 *list* 中的所有項目。這與 ``PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, "
"NULL)`` 相同,類似於 ``list.clear()`` 或 ``del list[:]``。"

#: ../../c-api/list.rst:160
#: ../../c-api/list.rst:196
msgid ""
"Raise an exception and return ``-1`` if *list* is not a :class:`list` "
"object. Return 0 on success."
msgstr "引發一個例外並回傳 ``-1`` 如果 *list* 不是一個 :class:`list` 物件。"
"如果成功回傳 0。"
msgstr ""
"引發一個例外並回傳 ``-1`` 如果 *list* 不是一個 :class:`list` 物件。如果成功回"
"傳 0。"

#: ../../c-api/list.rst:168
#: ../../c-api/list.rst:204
msgid ""
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is equivalent to ``list.sort()``."
msgstr ""
"對 *list* 的項目進行原地 (in place) 排序。成功時回傳 ``0``,失敗時回傳 "
"``-1``。這相當於 ``list.sort()``。"

#: ../../c-api/list.rst:174
#: ../../c-api/list.rst:209
msgid ""
"In the :term:`free-threaded build`, element comparison via :meth:`~object."
"__lt__` can execute arbitrary Python code, during which the :term:`per-"
"object lock` may be temporarily released. For built-in types (:class:`str`, :"
"class:`int`, :class:`float`), the lock is not released during comparison."
msgstr ""

#: ../../c-api/list.rst:218
msgid ""
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
"failure. This is the equivalent of ``list.reverse()``."
msgstr ""
"原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 "
"``list.reverse()``。"
"原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 ``list."
"reverse()``。"

#: ../../c-api/list.rst:182
#: ../../c-api/list.rst:226
msgid ""
"Return a new tuple object containing the contents of *list*; equivalent to "
"``tuple(list)``."
Expand All @@ -258,14 +298,14 @@ msgstr "object(物件)"
msgid "list"
msgstr "list(串列)"

#: ../../c-api/list.rst:51 ../../c-api/list.rst:180
#: ../../c-api/list.rst:51 ../../c-api/list.rst:224
msgid "built-in function"
msgstr "built-in function(內建函式)"

#: ../../c-api/list.rst:51
msgid "len"
msgstr "len"

#: ../../c-api/list.rst:180
#: ../../c-api/list.rst:224
msgid "tuple"
msgstr "tuple(元組)"
Loading
Loading