@@ -6,25 +6,29 @@ msgstr ""
6
6
"Project-Id-Version : Python 3.13\n "
7
7
"Report-Msgid-Bugs-To : \n "
8
8
"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-18 22:07 +0800\n "
10
10
"Last-Translator : \n "
11
11
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
12
12
"tw)\n "
13
13
"Language : zh_TW\n "
14
14
"MIME-Version : 1.0\n "
15
15
"Content-Type : text/plain; charset=UTF-8\n "
16
16
"Content-Transfer-Encoding : 8bit\n "
17
+ "X-Generator : Poedit 3.6\n "
17
18
18
19
#: ../../c-api/contextvars.rst:6
19
20
msgid "Context Variables Objects"
20
- msgstr "情境變數物件"
21
+ msgstr "情境變數物件(Context Variables Objects) "
21
22
22
23
#: ../../c-api/contextvars.rst:15
23
24
msgid ""
24
25
"In Python 3.7.1 the signatures of all context variables C APIs were "
25
26
"**changed** to use :c:type:`PyObject` pointers instead of :c:type:"
26
27
"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
27
28
msgstr ""
29
+ "在 Python 3.7.1 中所有情境變數 C API 的簽名都被 **改為** 使用 :c:type:"
30
+ "`PyObject` 指標,而不是 :c:type:`PyContext`、:c:type:`PyContextVar` 或 :c:"
31
+ "type:`PyContextToken`,例如:"
28
32
29
33
#: ../../c-api/contextvars.rst:20
30
34
msgid ""
@@ -34,6 +38,11 @@ msgid ""
34
38
"// in 3.7.1+:\n"
35
39
"PyObject *PyContext_New(void);"
36
40
msgstr ""
41
+ "// 在 3.7.0:\n"
42
+ "PyContext *PyContext_New(void);\n"
43
+ "\n"
44
+ "// 在 3.7.1+:\n"
45
+ "PyObject *PyContext_New(void);"
37
46
38
47
#: ../../c-api/contextvars.rst:26
39
48
msgid "See :issue:`34762` for more details."
@@ -42,94 +51,103 @@ msgstr "更多細節請見 :issue:`34762`。"
42
51
#: ../../c-api/contextvars.rst:29
43
52
msgid ""
44
53
"This section details the public C API for the :mod:`contextvars` module."
45
- msgstr ""
54
+ msgstr "本節詳述 :mod:`contextvars` 模組的公用 C API。 "
46
55
47
56
#: ../../c-api/contextvars.rst:33
48
57
msgid ""
49
58
"The C structure used to represent a :class:`contextvars.Context` object."
50
- msgstr ""
59
+ msgstr "用來代表 :class:`contextvars.Context` 物件的 C 結構。 "
51
60
52
61
#: ../../c-api/contextvars.rst:38
53
62
msgid ""
54
63
"The C structure used to represent a :class:`contextvars.ContextVar` object."
55
- msgstr ""
64
+ msgstr "用來代表 :class:`contextvars.ContextVar` 物件的 C 結構。 "
56
65
57
66
#: ../../c-api/contextvars.rst:43
58
67
msgid "The C structure used to represent a :class:`contextvars.Token` object."
59
- msgstr ""
68
+ msgstr "用來代表 :class:`contextvars.Token` 物件的 C 結構。 "
60
69
61
70
#: ../../c-api/contextvars.rst:47
62
71
msgid "The type object representing the *context* type."
63
- msgstr ""
72
+ msgstr "代表 *context* 型別的型別物件。 "
64
73
65
74
#: ../../c-api/contextvars.rst:51
66
75
msgid "The type object representing the *context variable* type."
67
- msgstr ""
76
+ msgstr "代表 *情境變數* 型別的型別物件。 "
68
77
69
78
#: ../../c-api/contextvars.rst:55
70
79
msgid "The type object representing the *context variable token* type."
71
- msgstr ""
80
+ msgstr "代表 *情境變數 token* 型別的型別物件。 "
72
81
73
82
#: ../../c-api/contextvars.rst:58
74
83
msgid "Type-check macros:"
75
- msgstr ""
84
+ msgstr "型別檢查巨集: "
76
85
77
86
#: ../../c-api/contextvars.rst:62
78
87
msgid ""
79
88
"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be "
80
89
"``NULL``. This function always succeeds."
81
90
msgstr ""
91
+ "如果 *o* 的型別為 :c:data:`PyContext_Type` 則回傳 true。*o* 不得為 ``NULL``。"
92
+ "此函式一定會成功回傳。"
82
93
83
94
#: ../../c-api/contextvars.rst:67
84
95
msgid ""
85
96
"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be "
86
97
"``NULL``. This function always succeeds."
87
98
msgstr ""
99
+ "如果 *o* 的類型為 :c:data:`PyContextVar_Type` 則回傳 true。*o* 不得為 "
100
+ "``NULL``。此函式一定會成功回傳。"
88
101
89
102
#: ../../c-api/contextvars.rst:72
90
103
msgid ""
91
104
"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be "
92
105
"``NULL``. This function always succeeds."
93
106
msgstr ""
107
+ "如果 *o* 的類型為 :c:data:`PyContextToken_Type` 則回傳 true。 *o* 不得為 "
108
+ "``NULL``。此函式一定會成功回傳。"
94
109
95
110
#: ../../c-api/contextvars.rst:76
96
111
msgid "Context object management functions:"
97
- msgstr ""
112
+ msgstr "情境物件管理功能: "
98
113
99
114
#: ../../c-api/contextvars.rst:80
100
115
msgid ""
101
116
"Create a new empty context object. Returns ``NULL`` if an error has "
102
117
"occurred."
103
- msgstr ""
118
+ msgstr "建立一個新的空的情境物件。 如果發生錯誤,則回傳 ``NULL``。 "
104
119
105
120
#: ../../c-api/contextvars.rst:85
106
121
msgid ""
107
122
"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` "
108
123
"if an error has occurred."
109
- msgstr ""
124
+ msgstr "建立傳入的 *ctx* 情境物件的淺層複製。如果發生錯誤,則回傳 ``NULL``。 "
110
125
111
126
#: ../../c-api/contextvars.rst:90
112
127
msgid ""
113
128
"Create a shallow copy of the current thread context. Returns ``NULL`` if an "
114
129
"error has occurred."
115
- msgstr ""
130
+ msgstr "建立目前執行緒上的情境的淺層複製。如果發生錯誤,則回傳 ``NULL``。 "
116
131
117
132
#: ../../c-api/contextvars.rst:95
118
133
msgid ""
119
134
"Set *ctx* as the current context for the current thread. Returns ``0`` on "
120
135
"success, and ``-1`` on error."
121
136
msgstr ""
137
+ "設定 *ctx* 為目前執行緒上的目前情境。成功時回傳 ``0``,錯誤時回傳 ``-1``。"
122
138
123
139
#: ../../c-api/contextvars.rst:100
124
140
msgid ""
125
141
"Deactivate the *ctx* context and restore the previous context as the current "
126
142
"context for the current thread. Returns ``0`` on success, and ``-1`` on "
127
143
"error."
128
144
msgstr ""
145
+ "關閉 *ctx* 情境,並將目前執行緒的目前情境設回之前的情境。 成功時回傳 ``0``,"
146
+ "錯誤時回傳 ``-1``。"
129
147
130
148
#: ../../c-api/contextvars.rst:105
131
149
msgid "Context variable functions:"
132
- msgstr ""
150
+ msgstr "情境變數函式: "
133
151
134
152
#: ../../c-api/contextvars.rst:109
135
153
msgid ""
@@ -138,45 +156,57 @@ msgid ""
138
156
"value for the context variable, or ``NULL`` for no default. If an error has "
139
157
"occurred, this function returns ``NULL``."
140
158
msgstr ""
159
+ "建立一個新的 ``ContextVar`` 物件。*name* 參數用於自我檢查(introspection)和"
160
+ "除錯目的。*def* 參數指定情境變數的預設值,亦可用 ``NULL`` 表示沒有預設值。 如"
161
+ "果發生錯誤,此函式會回傳 ``NULL``。"
141
162
142
163
#: ../../c-api/contextvars.rst:116
143
164
msgid ""
144
165
"Get the value of a context variable. Returns ``-1`` if an error has "
145
166
"occurred during lookup, and ``0`` if no error occurred, whether or not a "
146
167
"value was found."
147
168
msgstr ""
169
+ "取得情境變數的值。如果在查找過程中發生錯誤則回傳 ``-1``,如果沒有發生錯誤則無"
170
+ "論是否找到值都會回傳 ``0``。"
148
171
149
172
#: ../../c-api/contextvars.rst:120
150
173
msgid ""
151
174
"If the context variable was found, *value* will be a pointer to it. If the "
152
175
"context variable was *not* found, *value* will point to:"
153
176
msgstr ""
177
+ "如果找到情境變數,*value* 將會是指向它的指標。如果 *沒有* 找到情境變數,"
178
+ "*value* 將會指到:"
154
179
155
180
#: ../../c-api/contextvars.rst:123
156
181
msgid "*default_value*, if not ``NULL``;"
157
- msgstr ""
182
+ msgstr "*default_value* 預設值,但前提是預設值不是 ``NULL``; "
158
183
159
184
#: ../../c-api/contextvars.rst:124
160
185
msgid "the default value of *var*, if not ``NULL``;"
161
- msgstr ""
186
+ msgstr "*var* 的預設值,但前提是預設值不是 ``NULL``; "
162
187
163
188
#: ../../c-api/contextvars.rst:125
164
189
msgid "``NULL``"
165
190
msgstr "``NULL``"
166
191
167
192
#: ../../c-api/contextvars.rst:127
168
193
msgid "Except for ``NULL``, the function returns a new reference."
169
- msgstr ""
194
+ msgstr "除了 ``NULL`` 之外,此函式會回傳一個新的參照(reference)。 "
170
195
171
196
#: ../../c-api/contextvars.rst:131
172
197
msgid ""
173
198
"Set the value of *var* to *value* in the current context. Returns a new "
174
199
"token object for this change, or ``NULL`` if an error has occurred."
175
200
msgstr ""
201
+ "在目前的情境中將 *var* 的值設為 *value*。會回傳一個用來代表此變更的新 token "
202
+ "物件,如果發生錯誤則回傳 ``NULL``。"
176
203
177
204
#: ../../c-api/contextvars.rst:136
178
205
msgid ""
179
206
"Reset the state of the *var* context variable to that it was in before :c:"
180
207
"func:`PyContextVar_Set` that returned the *token* was called. This function "
181
208
"returns ``0`` on success and ``-1`` on error."
182
209
msgstr ""
210
+ "將 *var* 情境變數的狀態設回之前的狀態,亦即上一次回傳 token 的 :c:func:"
211
+ "`PyContextVar_Set` 被呼叫前的狀態。此函式在成功時回傳 ``0``,錯誤時回傳 "
212
+ "``-1``。"
0 commit comments