-
-
Notifications
You must be signed in to change notification settings - Fork 219
Working on c-api/tuple.po #1164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.14
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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" | ||||||||||||||
|
|
@@ -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 中的" | ||||||||||||||
| " :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``" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| "``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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 不要改到原文
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:56 | ||||||||||||||
| msgid "Like :c:func:`PyTuple_Size`, but without error checking." | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "就像 :c:func:`PyTuple_Size` 但沒有異常檢查。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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` 異常。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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* 的參照時有效)。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 這裡為什麼要加兩個 \?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 可以參考這個頁面的說明。主要是 reST 與 sphinx 的一些標記語法與中文全形左括號放一起的時候 html 會被 render 成不預期的樣子,成因未知;而在之間加 舉例來說,目前
而現在 library/_thread.html render 出來就是壞掉的:
譯文應該要改成:
build 出來才會是正確的樣式
|
||||||||||||||
| "若要取得一個 :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` 相似,但不修改其引數。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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`` 並拋出異常。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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]`` 表達式等價。但不支援從元組末端開始索引。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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* 的參照,並丟棄對元組中受影響位置的項目的參照。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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)檢查。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. asserting 是翻譯成作為斷言嗎?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||
|
|
||||||||||||||
| #: ../../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* 位置的所有參照皆會被洩漏。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:121 | ||||||||||||||
| msgid "" | ||||||||||||||
|
|
@@ -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`` 的結果值與呼叫此函數" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| "之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,傳回 ``-1``," | ||||||||||||||
| "並將 ``*p`` 設定為 ``NULL``,並拋出 :exc:`MemoryError` 或 :exc:`SystemError` 例外。" | ||||||||||||||
|
Comment on lines
+173
to
+174
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:136 | ||||||||||||||
| msgid "Struct Sequence Objects" | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "結構序列化物件" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 以建立結構序列型的實例,是否就可以?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我會覺得不夠貼切是因為原文有 |
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:148 ../../c-api/tuple.rst:217 | ||||||||||||||
| msgid "Return ``NULL`` with an exception set on failure." | ||||||||||||||
| msgstr "失敗時回傳 ``NULL`` 並設定例外。" | ||||||||||||||
| msgstr "失敗時回傳 ``NULL`` 並拋出例外。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:153 | ||||||||||||||
| msgid "Initializes a struct sequence type *type* from *desc* in place." | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "從 *desc* 就地初始化結構序列化型別 *type*。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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`` 並拋出例外。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:166 | ||||||||||||||
| msgid "Contains the meta information of a struct sequence type to create." | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "包含要建立的結構序列化型別的源資訊訊。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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`` 表示忽略。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:179 | ||||||||||||||
| msgid "Pointer to ``NULL``-terminated array with field names of the new type." | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "指向以 ``NULL`` 結尾的陣列指針包含新型別的欄位名稱。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:183 | ||||||||||||||
| msgid "Number of fields visible to the Python side (if used as tuple)." | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "Python 端可以看到欄位的數目 (如果使用元組)。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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`` 表示忽略。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:206 | ||||||||||||||
| msgid "Special value for a field name to leave it unnamed." | ||||||||||||||
| msgstr "" | ||||||||||||||
| msgstr "特別的值給欄位名稱,表示該欄位不命名。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 給定欄位名稱一個特別值,是否會比較通順?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 *`` 修改。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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* 處的物件。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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` 的別名型式實現。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../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` 的別名實現。" | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| #: ../../c-api/tuple.rst:8 | ||||||||||||||
| msgid "object" | ||||||||||||||
|
|
||||||||||||||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python layer 翻譯成「Python 層」?