Skip to content
Open
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
169 changes: 98 additions & 71 deletions c-api/tuple.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
#
# Translators:
# Leon H., 2017
#Yorkxe <[email protected]>, 2025
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-05 00:16+0000\n"
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
"Last-Translator: Leon H.\n"
"Last-Translator: Yorkxe <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
Expand All @@ -24,120 +25,133 @@ msgstr "Tuple(元組)物件"

#: ../../c-api/tuple.rst:13
msgid "This subtype of :c:type:`PyObject` represents a Python tuple object."
msgstr ""
msgstr "此 :c:type:`PyObject` 子型別代表 Python 元組物件"

#: ../../c-api/tuple.rst:18
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it "
"is the same object as :class:`tuple` in the Python layer."
msgstr ""
msgstr "此 :c:type:`PyTypeObject` 實例代表 Python 元組型別,與 Python layer 中的"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python layer 翻譯成「Python 層」?

" :class:`tuple` 是同一物件"

#: ../../c-api/tuple.rst:24
msgid ""
"Return true if *p* is a tuple object or an instance of a subtype of the "
"tuple type. This function always succeeds."
msgstr ""
msgstr "如果 *p* 為一元組物件或是元組型別的子型別實例時回傳 true。此函式總會執行成功"

#: ../../c-api/tuple.rst:30
msgid ""
"Return true if *p* is a tuple object, but not an instance of a subtype of "
"the tuple type. This function always succeeds."
msgstr ""
msgstr "如果 *p* 為一元組物件但不是元組型別的子型別實例時回傳 true。此函式總會執行成功"

#: ../../c-api/tuple.rst:36
msgid ""
"Return a new tuple object of size *len*, or ``NULL`` with an exception set "
"on failure."
msgstr ""
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``"
msgstr "回傳一個長度為 *len* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。"


#: ../../c-api/tuple.rst:42
msgid ""
"Return a new tuple object of size *n*, or ``NULL`` with an exception set on "
"failure. The tuple values are initialized to the subsequent *n* C arguments "
"pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
"``Py_BuildValue(\"(OO)\", a, b)``."
msgstr ""
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``。元組值被初始化為"
"指向 Python 物件的後續 *n* 個 C 參數。``PyTuple_Pack(2, a, b)`` 等價於"
Comment on lines +61 to +62
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``。元組值被初始化為"
"指向 Python 物件的後續 *n* 個 C 參數。``PyTuple_Pack(2, a, b)`` 等價於"
msgstr "回傳一個長度為 *n* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。元組值被初始化為"
"指向 Python 物件的接續 *n* 個 C 引數。``PyTuple_Pack(2, a, b)`` 等價於"

"``Py_BuildValue(\"(OO)\", a, b)``。"

#: ../../c-api/tuple.rst:50
msgid ""
"Take a pointer to a tuple object, and return the size of that tuple. On "
"error, return ``-1`` with an exception set."
msgstr ""
"error, return ``-1`` and with an exception set."
msgstr "拿取一個元組物件的指針,然後回傳此元組的大小。錯誤發生時,回傳 ``-1``。"
Comment on lines +68 to +69
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要改到原文

Suggested change
"error, return ``-1`` and with an exception set."
msgstr "拿取一個元組物件的指針,然後回傳此元組的大小。錯誤發生時,回傳 ``-1``。"
"error, return ``-1`` with an exception set."
msgstr "拿取一個元組物件的指標,然後回傳此元組的大小。錯誤發生時,回傳 ``-1`` 並設定例外。"


#: ../../c-api/tuple.rst:56
msgid "Like :c:func:`PyTuple_Size`, but without error checking."
msgstr ""
msgstr "就像 :c:func:`PyTuple_Size` 但沒有異常檢查。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "就像 :c:func:`PyTuple_Size` 但沒有異常檢查。"
msgstr "就像 :c:func:`PyTuple_Size` 但沒有錯誤檢查。"


#: ../../c-api/tuple.rst:61
msgid ""
"Return the object at position *pos* in the tuple pointed to by *p*. If "
"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:"
"`IndexError` exception."
msgstr ""
"*pos* is negative or out of bounds, return ``NULL`` and set "
"an :exc:`IndexError` exception."
msgstr "回傳 *p* 指向的元組中位置 *pos* 處的物件。如果 *pos* 為負數或超出範圍,回傳"
" ``NULL`` 並拋出 :exc:`IndexError` 異常。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" ``NULL`` 並拋出 :exc:`IndexError` 異常"
" ``NULL`` 並設定 :exc:`IndexError` 例外"


#: ../../c-api/tuple.rst:64
msgid ""
"The returned reference is borrowed from the tuple *p* (that is: it is only "
"valid as long as you hold a reference to *p*). To get a :term:`strong "
"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` or :c:"
"func:`PySequence_GetItem`."
msgstr ""
"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` "
"or :c:func:`PySequence_GetItem`."
msgstr "傳回的參照借自元組 *p*(也就是說:它僅在您持有 *p* 的參照時有效)。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "傳回的參照借自元組 *p*(也就是說:它僅在您持有 *p* 的參照時有效)。"
msgstr "回傳的參照借自元組 *p*\\ (也就是說:它僅在你持有 *p* 的參照時有效)。"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡為什麼要加兩個 \?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以參考這個頁面的說明。主要是 reST 與 sphinx 的一些標記語法與中文全形左括號放一起的時候 html 會被 render 成不預期的樣子,成因未知;而在之間加 \\ (兩個斜線加空格)可以在 sphinx build 辨識語法時有空格的效果但不會真的 render 出空格,樣式就不會跑掉。你也可以自己嘗試 build 出 html 檢查看看。


舉例來說,目前 library/_thread 的翻譯就有相同問題(我之後再修掉)

library/_thread.po 內的譯文是以下這樣,標示斜體的星號和中文全形左括號緊貼:

...該執行緒執行帶有引數列表 *args*(必須是一個 tuple(元組))的函式 *function*。...

而現在 library/_thread.html render 出來就是壞掉的:

image

譯文應該要改成:

...該執行緒執行帶有引數列表 *args*\\ (必須是一個 tuple(元組))的函式 *function*。...

build 出來才會是正確的樣式

image

"若要取得一個 :term:`strong reference`,請使用 :c:func:`Py_NewRef(PyTuple_GetItem(...)) "
"<Py_NewRef>` 或 :c:func:`PySequence_GetItem`。"

#: ../../c-api/tuple.rst:73
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
msgstr ""
msgstr "與 :c:func:`PyTuple_GetItem` 相似,但不修改其引數。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "與 :c:func:`PyTuple_GetItem` 相似,但不修改其引數。"
msgstr "與 :c:func:`PyTuple_GetItem` 相似,但不檢查其引數。"


#: ../../c-api/tuple.rst:78
msgid ""
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or "
"``NULL`` with an exception set on failure."
msgstr ""
msgstr "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或回傳 ``NULL`` 並拋出異常。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或回傳 ``NULL`` 並拋出異常。"
msgstr "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或在錯誤時回傳 ``NULL`` 並設定例外。"


#: ../../c-api/tuple.rst:81
msgid ""
"This is the equivalent of the Python expression ``p[low:high]``. Indexing "
"from the end of the tuple is not supported."
msgstr ""
msgstr "這與 Python ``p[low:high]`` 表達式等價。但不支援從元組末端開始索引。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "這與 Python ``p[low:high]`` 表達式等價。但不支援從元組末端開始索引。"
msgstr "這與 Python ``p[low:high]`` 運算式等價。但不支援從元組末端開始索引。"


#: ../../c-api/tuple.rst:87
msgid ""
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
"and set an :exc:`IndexError` exception."
msgstr ""
msgstr "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。如果 *pos* 超出邊界, "
"回傳 ``-1``,並拋出 :exc:`IndexError` 異常。"
Comment on lines +114 to +115
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。如果 *pos* 超出邊界, "
"回傳 ``-1``,並拋出 :exc:`IndexError` 異常"
msgstr "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。成功時回傳 ``0``,如果 *pos* 超出邊界則"
"回傳 ``-1`` 並設定 :exc:`IndexError` 例外"


#: ../../c-api/tuple.rst:93
msgid ""
"This function \"steals\" a reference to *o* and discards a reference to an "
"item already in the tuple at the affected position."
msgstr ""
msgstr "此函數 \"竊取\" 對 *o* 的參照,並丟棄對元組中受影響位置的項目的參照。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "此函數 \"竊取\" 對 *o* 的參照,並丟棄對元組中受影響位置的項目的參照。"
msgstr "此函式 \"竊取\" 對 *o* 的參照,並丟棄對元組中受影響位置的項目的參照。"


#: ../../c-api/tuple.rst:99
msgid ""
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
"*only* be used to fill in brand new tuples."
msgstr ""
msgstr "與 :c:func:`PyTuple_SetItem` 相似,但不進行錯誤檢查,且應 *只* "
"用於填充全新的元組。"

#: ../../c-api/tuple.rst:102 ../../c-api/tuple.rst:224
#: ../../c-api/tuple.rst:242
msgid ""
"Bounds checking is performed as an assertion if Python is built in :ref:"
"`debug mode <debug-build>` or :option:`with assertions <--with-assertions>`."
msgstr ""
"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 mode <debug-build>` 或 :option:`with assertions"
" <--with-assertions>` 建構,則會進行邊界的斷言(asserting)檢查。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" <--with-assertions>` 建構,則會進行邊界的斷言(asserting)檢查"
" <--with-assertions>` 建置,則會進行作為斷言(asserting)的邊界檢查"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asserting 是翻譯成作為斷言嗎?

Copy link
Collaborator

@mattwang44 mattwang44 Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前大多翻成「斷言」沒錯,但我是覺得還有討論空間,感覺這個詞彙在繁中不是很常用。
另外微軟文件翻譯是有「斷言 (ref)」也有「判斷提示 (ref)」,也有聽過有人翻譯成「判斷」,我自己是都覺得不夠貼切。


#: ../../c-api/tuple.rst:107
msgid ""
"This function \"steals\" a reference to *o*, and, unlike :c:func:"
"`PyTuple_SetItem`, does *not* discard a reference to any item that is being "
"replaced; any reference in the tuple at position *pos* will be leaked."
msgstr ""
"This function \"steals\" a reference to *o*, and, "
"unlike :c:func:`PyTuple_SetItem`, does *not* discard a reference to any item "
"that is being replaced; any reference in the tuple at position *pos* will be "
"leaked."
msgstr "此函式 \"竊取\" 對 *o* 的參照,且與 :c:func:`PyTuple_SetItem` 不同的是,"
"此函式並不丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"此函式並不丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"
"此函式並 *不* 丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"


#: ../../c-api/tuple.rst:114
msgid ""
"This macro should *only* be used on tuples that are newly created. Using "
"this macro on a tuple that is already in use (or in other words, has a "
"refcount > 1) could lead to undefined behavior."
msgstr ""
msgstr "此巨集 *僅* 套用於新建立的元組。在已使用的元組(或換句話說,引用計數大於 "
"1 的元組)上使用此巨集可能會導致未定義行為。"
Comment on lines +153 to +154
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "此巨集 *僅* 套用於新建立的元組。在已使用的元組(或換句話說,引用計數大於 "
"1 的元組)上使用此巨集可能會導致未定義行為。"
msgstr "此巨集應 *僅* 用於新建立的元組。在正被使用中的元組(或換句話說,參照計數大於 "
"1 的元組)上使用此巨集可能會導致未定義行為。"


#: ../../c-api/tuple.rst:121
msgid ""
Expand All @@ -150,129 +164,142 @@ msgid ""
"Client code should never assume that the resulting value of ``*p`` will be "
"the same as before calling this function. If the object referenced by ``*p`` "
"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:"
"`SystemError`."
msgstr ""
"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` "
"or :exc:`SystemError`."
msgstr "可用於調整元組的大小。*newsize* 將是元組的新長度。由於元組 *應該* 是不可變的,"
"因此僅當物件只有一個參照時才應使用此方法。如果程式碼的其他部分已經知道該元組,則 "
"*不要* 使用此方法。最終元組總會變大或縮小。可以將其理解為銷毀舊元組並建立一個新元組,"
"只是有著更高的效率。成功時回傳 ``0``。客戶端程式碼絕不應假設 ``*p`` 的結果值與呼叫此函數"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"只是有著更高的效率。成功時回傳 ``0``。客戶端程式碼絕不應假設 ``*p`` 的結果值與呼叫此函數"
"只是有著更高的效率。成功時回傳 ``0``。用戶端程式碼絕不應假設 ``*p`` 的結果值與呼叫此函式"

"之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,傳回 ``-1``,"
"並將 ``*p`` 設定為 ``NULL``,並拋出 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"
Comment on lines +173 to +174
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,傳回 ``-1``,"
"並將 ``*p`` 設定為 ``NULL``,並拋出 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"
"之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,回傳 ``-1``,"
"並將 ``*p`` 設定為 ``NULL``,並引發 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"


#: ../../c-api/tuple.rst:136
msgid "Struct Sequence Objects"
msgstr ""
msgstr "結構序列化物件"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "結構序列化物件"
msgstr "結構序列物件"


#: ../../c-api/tuple.rst:138
msgid ""
"Struct sequence objects are the C equivalent of :func:`~collections."
"namedtuple` objects, i.e. a sequence whose items can also be accessed "
"through attributes. To create a struct sequence, you first have to create a "
"specific struct sequence type."
msgstr ""
"Struct sequence objects are the C equivalent "
"of :func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
"also be accessed through attributes. To create a struct sequence, you first "
"have to create a specific struct sequence type."
msgstr "結構序列化物件與 C 語言中的 :func:`~collections.namedtuple` 物件等價,換言之,"
"一個序列的元素也可以透過屬性存取。要建立結構體序列,首先需要建立特定類型的結構體型別。"
Comment on lines +186 to +187
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "結構序列化物件與 C 語言中的 :func:`~collections.namedtuple` 物件等價,換言之,"
"一個序列的元素也可以透過屬性存取。要建立結構體序列,首先需要建立特定類型的結構體型別"
msgstr "結構序列物件是 :func:`~collections.namedtuple` 物件在 C 語言中的等價,換言之,"
"一個序列的元素也可以透過屬性存取。要建立結構序列,首先需要建立特定的結構序列型別"


#: ../../c-api/tuple.rst:145
msgid ""
"Create a new struct sequence type from the data in *desc*, described below. "
"Instances of the resulting type can be created with :c:func:"
"`PyStructSequence_New`."
msgstr ""
"Instances of the resulting type can be created "
"with :c:func:`PyStructSequence_New`."
msgstr "從 *desc* 的資料建立一個新的結構序列型別,如下所述。可以使用 "
":c:func:`PyStructSequence_New` 建立結構序列型別實例。"
Comment on lines +194 to +195
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "從 *desc* 的資料建立一個新的結構序列型別,如下所述。可以使用 "
":c:func:`PyStructSequence_New` 建立結構序列型別實例"
msgstr "從 *desc* 中的資料建立一個新的結構序列型別,如下所述。可以使用 "
":c:func:`PyStructSequence_New` 以建立產生之結構序列型別的實例"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以建立結構序列型的實例,是否就可以?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我會覺得不夠貼切是因為原文有 resulting,代表這邊特指前一句話描述的結構序列型別


#: ../../c-api/tuple.rst:148 ../../c-api/tuple.rst:217
msgid "Return ``NULL`` with an exception set on failure."
msgstr "失敗時回傳 ``NULL`` 並設定例外。"
msgstr "失敗時回傳 ``NULL`` 並拋出例外。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "失敗時回傳 ``NULL`` 並拋出例外。"
msgstr "失敗時回傳 ``NULL`` 並設定例外。"


#: ../../c-api/tuple.rst:153
msgid "Initializes a struct sequence type *type* from *desc* in place."
msgstr ""
msgstr "從 *desc* 就地初始化結構序列化型別 *type*。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "從 *desc* 就地初始化結構序列化型別 *type*。"
msgstr "從 *desc* 原地 (in place) 初始化結構序列型別 *type*。"


#: ../../c-api/tuple.rst:158
msgid ""
"Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and "
"``-1`` with an exception set on failure."
msgstr ""
msgstr "與 :c:func:`PyStructSequence_InitType` 相似,但運行成功時回傳 ``0``,"
"運行失敗時回傳 ``-1`` 並拋出例外。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"運行失敗時回傳 ``-1`` 並拋出例外"
"運行失敗時回傳 ``-1`` 並設定例外"


#: ../../c-api/tuple.rst:166
msgid "Contains the meta information of a struct sequence type to create."
msgstr ""
msgstr "包含要建立的結構序列化型別的源資訊訊。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata on wiki

Suggested change
msgstr "包含要建立的結構序列化型別的源資訊訊。"
msgstr "包含要建立的結構序列型別的中介資訊 (meta information)。"


#: ../../c-api/tuple.rst:170
msgid ""
"Fully qualified name of the type; null-terminated UTF-8 encoded. The name "
"must contain the module name."
msgstr ""
msgstr "型別的完整限定名稱(Fully qualified name);以 UTF-8 編碼並以空字元結尾。"
"名稱必須包含完整的模組名稱。"

#: ../../c-api/tuple.rst:175
msgid "Pointer to docstring for the type or ``NULL`` to omit."
msgstr ""
msgstr "指向型別文件 (docstring) 的指針或使用 ``NULL`` 表示忽略。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "指向型別文件 (docstring) 的指針或使用 ``NULL`` 表示忽略。"
msgstr "指向型別說明字串 (docstring) 的指標或使用 ``NULL`` 表示忽略。"


#: ../../c-api/tuple.rst:179
msgid "Pointer to ``NULL``-terminated array with field names of the new type."
msgstr ""
msgstr "指向以 ``NULL`` 結尾的陣列指針包含新型別的欄位名稱。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "指向以 ``NULL`` 結尾的陣列指針包含新型別的欄位名稱。"
msgstr "指向一個以 ``NULL`` 結尾的陣列指標,其包含新型別的欄位名稱。"


#: ../../c-api/tuple.rst:183
msgid "Number of fields visible to the Python side (if used as tuple)."
msgstr ""
msgstr "Python 端可以看到欄位的數目 (如果使用元組)。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "Python 端可以看到欄位的數目 (如果使用元組)。"
msgstr "Python 端可以看到欄位的數目 (如果作為元組使用)。"


#: ../../c-api/tuple.rst:188
msgid ""
"Describes a field of a struct sequence. As a struct sequence is modeled as a "
"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:"
"member:`~PyStructSequence_Desc.fields` array of the :c:type:"
"`PyStructSequence_Desc` determines which field of the struct sequence is "
"described."
msgstr ""
"tuple, all fields are typed as :c:expr:`PyObject*`. The index in "
"the :c:member:`~PyStructSequence_Desc.fields` array of "
"the :c:type:`PyStructSequence_Desc` determines which field of the struct "
"sequence is described."
msgstr "描述結構體序列的一個欄位。由於結構體序列以元組建構,所有欄位的型別均為 "
":c:expr:`PyObject*`。 :c:type:`PyStructSequence_Desc` 的 "
":c:member:`~PyStructSequence_Desc.fields` 陣列中的索引決定了結構體序列的哪個欄位。"
Comment on lines +242 to +244
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "描述結構體序列的一個欄位。由於結構體序列以元組建構,所有欄位的型別均為 "
":c:expr:`PyObject*`。 :c:type:`PyStructSequence_Desc` "
":c:member:`~PyStructSequence_Desc.fields` 陣列中的索引決定了結構體序列的哪個欄位"
msgstr "描述結構序列的一個欄位。由於結構序列以元組作為原型,所有欄位的型別均為 "
":c:expr:`PyObject*`。:c:type:`PyStructSequence_Desc` "
":c:member:`~PyStructSequence_Desc.fields` 陣列中的索引決定了描述的是結構序列的哪個欄位"


#: ../../c-api/tuple.rst:196
msgid ""
"Name for the field or ``NULL`` to end the list of named fields, set to :c:"
"data:`PyStructSequence_UnnamedField` to leave unnamed."
msgstr ""
"Name for the field or ``NULL`` to end the list of named fields, set "
"to :c:data:`PyStructSequence_UnnamedField` to leave unnamed."
msgstr "欄位名稱,或 ``NULL`` 表示命名欄位串列結束,設定為 "
":c:data:`PyStructSequence_UnnamedField` 表示該欄位不命名。"

#: ../../c-api/tuple.rst:201
msgid "Field docstring or ``NULL`` to omit."
msgstr ""
msgstr "欄位文件或使用 ``NULL`` 表示忽略。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "欄位文件或使用 ``NULL`` 表示忽略。"
msgstr "欄位說明字串或為 ``NULL`` 表示忽略。"


#: ../../c-api/tuple.rst:206
msgid "Special value for a field name to leave it unnamed."
msgstr ""
msgstr "特別的值給欄位名稱,表示該欄位不命名。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "特別的值給欄位名稱,表示該欄位不命名。"
msgstr "欄位名稱的一個特別值,表示該欄位不命名。"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

給定欄位名稱一個特別值,是否會比較通順?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok 我覺得也通順


#: ../../c-api/tuple.rst:208
msgid "The type was changed from ``char *``."
msgstr ""
msgstr "型別已被 ``char *`` 修改。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "型別已被 ``char *`` 修改。"
msgstr "型別原本是 ``char *``,現已被修改。"


#: ../../c-api/tuple.rst:214
msgid ""
"Creates an instance of *type*, which must have been created with :c:func:"
"`PyStructSequence_NewType`."
msgstr ""
"Creates an instance of *type*, which must have been created "
"with :c:func:`PyStructSequence_NewType`."
msgstr "建立 *type* 的實例,必須以 :c:func:`PyStructSequence_NewType` 建立。"

#: ../../c-api/tuple.rst:222
msgid ""
"Return the object at position *pos* in the struct sequence pointed to by *p*."
msgstr ""
msgstr "回傳結構體序列中由 *p* 指向 *pos* 處的物件。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "回傳結構體序列中由 *p* 指向 *pos* 處的物件。"
msgstr "回傳結構序列中由 *p* 指向 *pos* 處的物件。"


#: ../../c-api/tuple.rst:230
msgid "Alias to :c:func:`PyStructSequence_GetItem`."
msgstr ""
msgstr ":c:func:`PyStructSequence_GetItem` 的別名。"

#: ../../c-api/tuple.rst:232
msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`."
msgstr ""
msgstr "現在以 :c:func:`PyStructSequence_GetItem` 的別名型式實現。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "現在以 :c:func:`PyStructSequence_GetItem` 的別名型式實現。"
msgstr "現在是被實作為 :c:func:`PyStructSequence_GetItem` 的一個別名。"


#: ../../c-api/tuple.rst:238
msgid ""
"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
"new instances."
msgstr ""
msgstr "將結構體序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
":c:func:`PyTuple_SET_ITEM` 類似,此函數僅套用於填充全新實例。"
Comment on lines +289 to +290
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "將結構體序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
":c:func:`PyTuple_SET_ITEM` 類似,此函數僅套用於填充全新實例"
msgstr "將結構序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
":c:func:`PyTuple_SET_ITEM` 類似,此函式僅套用於填充全新實例"


#: ../../c-api/tuple.rst:247
msgid "This function \"steals\" a reference to *o*."
msgstr ""
msgstr "此函式 \"竊取\" *o* 的參照。"

#: ../../c-api/tuple.rst:252
msgid "Alias to :c:func:`PyStructSequence_SetItem`."
msgstr ""
msgstr ":c:func:`PyStructSequence_SetItem` 的別名。"

#: ../../c-api/tuple.rst:254
msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`."
msgstr ""
msgstr "現在以 :c:func:`PyStructSequence_SetItem` 的別名實現。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "現在以 :c:func:`PyStructSequence_SetItem` 的別名實現。"
msgstr "現在是被實作為 :c:func:`PyStructSequence_SetItem` 的一個別名。"


#: ../../c-api/tuple.rst:8
msgid "object"
Expand Down