@@ -6,25 +6,29 @@ msgstr ""
66"Project-Id-Version :Python 3.13\n "
77"Report-Msgid-Bugs-To :\n "
88"POT-Creation-Date :2024-09-01 22:24+0800\n "
9- "PO-Revision-Date :2018-07-15 18:56 +0800\n "
9+ "PO-Revision-Date :2025-06-27 00:11 +0800\n "
1010"Last-Translator :\n "
1111"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1212"tw)\n "
1313"Language :zh_TW\n "
1414"MIME-Version :1.0\n "
1515"Content-Type :text/plain; charset=UTF-8\n "
1616"Content-Transfer-Encoding :8bit\n "
17+ "X-Generator :Poedit 3.6\n "
1718
1819#: ../../c-api/contextvars.rst:6
1920msgid "Context Variables Objects"
20- msgstr "情境變數物件"
21+ msgstr "情境變數物件(Context Variables Objects) "
2122
2223#: ../../c-api/contextvars.rst:15
2324msgid ""
2425"In Python 3.7.1 the signatures of all context variables C APIs were "
2526"**changed** to use :c:type:`PyObject` pointers instead of :c:type:"
2627"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
2728msgstr ""
29+ "在 Python 3.7.1 中所有情境變數 C API 的簽名都被\\ **改為**\\ 使用 :c:type:"
30+ "`PyObject` 指標,而不是 :c:type:`PyContext`、:c:type:`PyContextVar` 或 :c:"
31+ "type:`PyContextToken`,例如:"
2832
2933#: ../../c-api/contextvars.rst:20
3034msgid ""
@@ -34,6 +38,11 @@ msgid ""
3438"// in 3.7.1+:\n"
3539"PyObject *PyContext_New(void);"
3640msgstr ""
41+ "// 在 3.7.0:\n"
42+ "PyContext *PyContext_New(void);\n"
43+ "\n"
44+ "// 在 3.7.1+:\n"
45+ "PyObject *PyContext_New(void);"
3746
3847#: ../../c-api/contextvars.rst:26
3948msgid "See :issue:`34762` for more details."
@@ -42,94 +51,103 @@ msgstr "更多細節請見 :issue:`34762`。"
4251#: ../../c-api/contextvars.rst:29
4352msgid ""
4453"This section details the public C API for the :mod:`contextvars` module."
45- msgstr ""
54+ msgstr "本節詳述 :mod:`contextvars` 模組的公開 C API。 "
4655
4756#: ../../c-api/contextvars.rst:33
4857msgid ""
4958"The C structure used to represent a :class:`contextvars.Context` object."
50- msgstr ""
59+ msgstr "用來代表 :class:`contextvars.Context` 物件的 C 結構。 "
5160
5261#: ../../c-api/contextvars.rst:38
5362msgid ""
5463"The C structure used to represent a :class:`contextvars.ContextVar` object."
55- msgstr ""
64+ msgstr "用來代表 :class:`contextvars.ContextVar` 物件的 C 結構。 "
5665
5766#: ../../c-api/contextvars.rst:43
5867msgid "The C structure used to represent a :class:`contextvars.Token` object."
59- msgstr ""
68+ msgstr "用來代表 :class:`contextvars.Token` 物件的 C 結構。 "
6069
6170#: ../../c-api/contextvars.rst:47
6271msgid "The type object representing the *context* type."
63- msgstr ""
72+ msgstr "代表 *context* 型別的型別物件。 "
6473
6574#: ../../c-api/contextvars.rst:51
6675msgid "The type object representing the *context variable* type."
67- msgstr ""
76+ msgstr "代表 *情境變數* 型別的型別物件。 "
6877
6978#: ../../c-api/contextvars.rst:55
7079msgid "The type object representing the *context variable token* type."
71- msgstr ""
80+ msgstr "代表 *情境變數 token* 型別的型別物件。 "
7281
7382#: ../../c-api/contextvars.rst:58
7483msgid "Type-check macros:"
75- msgstr ""
84+ msgstr "型別檢查巨集: "
7685
7786#: ../../c-api/contextvars.rst:62
7887msgid ""
7988"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be "
8089"``NULL``. This function always succeeds."
8190msgstr ""
91+ "如果 *o* 的型別為 :c:data:`PyContext_Type` 則回傳 true。*o* 不得為 ``NULL``。"
92+ "此函式一定會成功回傳。"
8293
8394#: ../../c-api/contextvars.rst:67
8495msgid ""
8596"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be "
8697"``NULL``. This function always succeeds."
8798msgstr ""
99+ "如果 *o* 的類型為 :c:data:`PyContextVar_Type` 則回傳 true。*o* 不得為 "
100+ "``NULL``。此函式一定會成功回傳。"
88101
89102#: ../../c-api/contextvars.rst:72
90103msgid ""
91104"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be "
92105"``NULL``. This function always succeeds."
93106msgstr ""
107+ "如果 *o* 的類型為 :c:data:`PyContextToken_Type` 則回傳 true。 *o* 不得為 "
108+ "``NULL``。此函式一定會成功回傳。"
94109
95110#: ../../c-api/contextvars.rst:76
96111msgid "Context object management functions:"
97- msgstr ""
112+ msgstr "情境物件管理函式: "
98113
99114#: ../../c-api/contextvars.rst:80
100115msgid ""
101116"Create a new empty context object. Returns ``NULL`` if an error has "
102117"occurred."
103- msgstr ""
118+ msgstr "建立一個新的空的情境物件。 如果發生錯誤,則回傳 ``NULL``。 "
104119
105120#: ../../c-api/contextvars.rst:85
106121msgid ""
107122"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` "
108123"if an error has occurred."
109- msgstr ""
124+ msgstr "建立傳入的 *ctx* 情境物件的淺層複製 (shallow copy)。如果發生錯誤,則回傳 ``NULL``。 "
110125
111126#: ../../c-api/contextvars.rst:90
112127msgid ""
113128"Create a shallow copy of the current thread context. Returns ``NULL`` if an "
114129"error has occurred."
115- msgstr ""
130+ msgstr "建立目前執行緒上的情境的淺層複製。如果發生錯誤,則回傳 ``NULL``。 "
116131
117132#: ../../c-api/contextvars.rst:95
118133msgid ""
119134"Set *ctx* as the current context for the current thread. Returns ``0`` on "
120135"success, and ``-1`` on error."
121136msgstr ""
137+ "設定 *ctx* 為目前執行緒上的目前情境。成功時回傳 ``0``,錯誤時回傳 ``-1``。"
122138
123139#: ../../c-api/contextvars.rst:100
124140msgid ""
125141"Deactivate the *ctx* context and restore the previous context as the current "
126142"context for the current thread. Returns ``0`` on success, and ``-1`` on "
127143"error."
128144msgstr ""
145+ "關閉 *ctx* 情境,並將目前執行緒的目前情境設回之前的情境。 成功時回傳 ``0``,"
146+ "錯誤時回傳 ``-1``。"
129147
130148#: ../../c-api/contextvars.rst:105
131149msgid "Context variable functions:"
132- msgstr ""
150+ msgstr "情境變數函式: "
133151
134152#: ../../c-api/contextvars.rst:109
135153msgid ""
@@ -138,45 +156,57 @@ msgid ""
138156"value for the context variable, or ``NULL`` for no default. If an error has "
139157"occurred, this function returns ``NULL``."
140158msgstr ""
159+ "建立一個新的 ``ContextVar`` 物件。*name* 參數用於自我檢查(introspection)和"
160+ "除錯目的。*def* 參數指定情境變數的預設值,亦可用 ``NULL`` 表示沒有預設值。 如"
161+ "果發生錯誤,此函式會回傳 ``NULL``。"
141162
142163#: ../../c-api/contextvars.rst:116
143164msgid ""
144165"Get the value of a context variable. Returns ``-1`` if an error has "
145166"occurred during lookup, and ``0`` if no error occurred, whether or not a "
146167"value was found."
147168msgstr ""
169+ "取得情境變數的值。如果在查找過程中發生錯誤則回傳 ``-1``,如果沒有發生錯誤則無"
170+ "論是否找到值都會回傳 ``0``。"
148171
149172#: ../../c-api/contextvars.rst:120
150173msgid ""
151174"If the context variable was found, *value* will be a pointer to it. If the "
152175"context variable was *not* found, *value* will point to:"
153176msgstr ""
177+ "如果找到情境變數,*value* 將會是指向它的指標。如果 *沒有* 找到情境變數,"
178+ "*value* 將會指到:"
154179
155180#: ../../c-api/contextvars.rst:123
156181msgid "*default_value*, if not ``NULL``;"
157- msgstr ""
182+ msgstr "*default_value* 預設值,但前提是預設值不是 ``NULL``; "
158183
159184#: ../../c-api/contextvars.rst:124
160185msgid "the default value of *var*, if not ``NULL``;"
161- msgstr ""
186+ msgstr "*var* 的預設值,但前提是預設值不是 ``NULL``; "
162187
163188#: ../../c-api/contextvars.rst:125
164189msgid "``NULL``"
165190msgstr "``NULL``"
166191
167192#: ../../c-api/contextvars.rst:127
168193msgid "Except for ``NULL``, the function returns a new reference."
169- msgstr ""
194+ msgstr "除了 ``NULL`` 之外,此函式會回傳一個新的參照(reference)。 "
170195
171196#: ../../c-api/contextvars.rst:131
172197msgid ""
173198"Set the value of *var* to *value* in the current context. Returns a new "
174199"token object for this change, or ``NULL`` if an error has occurred."
175200msgstr ""
201+ "在目前的情境中將 *var* 的值設為 *value*。會回傳一個用來代表此變更的新 token "
202+ "物件,如果發生錯誤則回傳 ``NULL``。"
176203
177204#: ../../c-api/contextvars.rst:136
178205msgid ""
179206"Reset the state of the *var* context variable to that it was in before :c:"
180207"func:`PyContextVar_Set` that returned the *token* was called. This function "
181208"returns ``0`` on success and ``-1`` on error."
182209msgstr ""
210+ "將 *var* 情境變數的狀態設回之前的狀態,亦即上一次回傳 token 的 :c:func:"
211+ "`PyContextVar_Set` 被呼叫前的狀態。此函式在成功時回傳 ``0``,錯誤時回傳 "
212+ "``-1``。"