-
-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy pathasyncio-api-index.po
460 lines (359 loc) · 14.7 KB
/
asyncio-api-index.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Matt Wang <[email protected]>, 2022
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-31 08:13+0000\n"
"PO-Revision-Date: 2022-01-27 21:25+0800\n"
"Last-Translator: Matt Wang <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0.1\n"
#: ../../library/asyncio-api-index.rst:6
msgid "High-level API Index"
msgstr "高階 API 索引"
#: ../../library/asyncio-api-index.rst:8
msgid "This page lists all high-level async/await enabled asyncio APIs."
msgstr "這個頁面列出了所有能使用 async/wait 的高階 asyncio API。"
#: ../../library/asyncio-api-index.rst:12
msgid "Tasks"
msgstr "任務 (Tasks)"
#: ../../library/asyncio-api-index.rst:14
msgid ""
"Utilities to run asyncio programs, create Tasks, and await on multiple "
"things with timeouts."
msgstr ""
"用於執行非同步程式、建立 Task 物件、帶有超時 (timeout) 設定地等待多個事件的工"
"具程式。"
#: ../../library/asyncio-api-index.rst:21
msgid ":func:`run`"
msgstr ":func:`run`"
#: ../../library/asyncio-api-index.rst:22
msgid "Create event loop, run a coroutine, close the loop."
msgstr "建立事件迴圈 (event loop)、執行一個協程 (coroutine)、關閉事件迴圈。"
#: ../../library/asyncio-api-index.rst:24
msgid ":class:`Runner`"
msgstr ":class:`Runner`"
#: ../../library/asyncio-api-index.rst:25
msgid "A context manager that simplifies multiple async function calls."
msgstr ""
#: ../../library/asyncio-api-index.rst:27
msgid ":class:`Task`"
msgstr ":class:`Task`"
#: ../../library/asyncio-api-index.rst:28
msgid "Task object."
msgstr "Task 物件。"
#: ../../library/asyncio-api-index.rst:30
msgid ":class:`TaskGroup`"
msgstr ":class:`TaskGroup`"
#: ../../library/asyncio-api-index.rst:31
msgid ""
"A context manager that holds a group of tasks. Provides a convenient and "
"reliable way to wait for all tasks in the group to finish."
msgstr ""
#: ../../library/asyncio-api-index.rst:35
msgid ":func:`create_task`"
msgstr ":func:`create_task`"
#: ../../library/asyncio-api-index.rst:36
msgid "Start an asyncio Task, then returns it."
msgstr "啟動一個 asyncio 的 Task 物件,然後回傳它。"
#: ../../library/asyncio-api-index.rst:38
msgid ":func:`current_task`"
msgstr ":func:`current_task`"
#: ../../library/asyncio-api-index.rst:39
msgid "Return the current Task."
msgstr "回傳目前 Task 物件。"
#: ../../library/asyncio-api-index.rst:41
msgid ":func:`all_tasks`"
msgstr ":func:`all_tasks`"
#: ../../library/asyncio-api-index.rst:42
msgid "Return all tasks that are not yet finished for an event loop."
msgstr "回傳事件迴圈中所有未完成的 task 物件。"
#: ../../library/asyncio-api-index.rst:44
msgid "``await`` :func:`sleep`"
msgstr "``await`` :func:`sleep`"
#: ../../library/asyncio-api-index.rst:45
msgid "Sleep for a number of seconds."
msgstr "休眠數秒鐘。"
#: ../../library/asyncio-api-index.rst:47
msgid "``await`` :func:`gather`"
msgstr "``await`` :func:`gather`"
#: ../../library/asyncio-api-index.rst:48
msgid "Schedule and wait for things concurrently."
msgstr "並行 (concurrent) 地執行事件的排程與等待。"
#: ../../library/asyncio-api-index.rst:50
msgid "``await`` :func:`wait_for`"
msgstr "``await`` :func:`wait_for`"
#: ../../library/asyncio-api-index.rst:51
msgid "Run with a timeout."
msgstr "有超時設置的執行。"
#: ../../library/asyncio-api-index.rst:53
msgid "``await`` :func:`shield`"
msgstr "``await`` :func:`shield`"
#: ../../library/asyncio-api-index.rst:54
msgid "Shield from cancellation."
msgstr "屏蔽取消操作。"
#: ../../library/asyncio-api-index.rst:56
msgid "``await`` :func:`wait`"
msgstr "``await`` :func:`wait`"
#: ../../library/asyncio-api-index.rst:57
msgid "Monitor for completion."
msgstr "監控完成情況。"
#: ../../library/asyncio-api-index.rst:59
msgid ":func:`timeout`"
msgstr ":func:`timeout`"
#: ../../library/asyncio-api-index.rst:60
msgid "Run with a timeout. Useful in cases when ``wait_for`` is not suitable."
msgstr ""
#: ../../library/asyncio-api-index.rst:62
msgid ":func:`to_thread`"
msgstr ":func:`to_thread`"
#: ../../library/asyncio-api-index.rst:63
msgid "Asynchronously run a function in a separate OS thread."
msgstr "在不同的 OS 執行緒 (thread) 中非同步地執行一個函式。"
#: ../../library/asyncio-api-index.rst:65
msgid ":func:`run_coroutine_threadsafe`"
msgstr ":func:`run_coroutine_threadsafe`"
#: ../../library/asyncio-api-index.rst:66
msgid "Schedule a coroutine from another OS thread."
msgstr "從其他 OS 執行緒中為一個協程排程。"
#: ../../library/asyncio-api-index.rst:68
msgid "``for in`` :func:`as_completed`"
msgstr "``for in`` :func:`as_completed`"
#: ../../library/asyncio-api-index.rst:69
msgid "Monitor for completion with a ``for`` loop."
msgstr "用 ``for`` 迴圈來監控完成情況。"
#: ../../library/asyncio-api-index.rst:73
#: ../../library/asyncio-api-index.rst:109
#: ../../library/asyncio-api-index.rst:133
#: ../../library/asyncio-api-index.rst:169
#: ../../library/asyncio-api-index.rst:205
#: ../../library/asyncio-api-index.rst:230
msgid "Examples"
msgstr "範例"
#: ../../library/asyncio-api-index.rst:74
msgid ""
":ref:`Using asyncio.gather() to run things in parallel "
"<asyncio_example_gather>`."
msgstr ""
":ref:`使用 asyncio.gather() 平行 (parallel) 執行 <asyncio_example_gather>`。"
#: ../../library/asyncio-api-index.rst:77
msgid ""
":ref:`Using asyncio.wait_for() to enforce a timeout "
"<asyncio_example_waitfor>`."
msgstr ""
":ref:`使用 asyncio.wait_for() 強制設置超時 <asyncio_example_waitfor>`。"
#: ../../library/asyncio-api-index.rst:80
msgid ":ref:`Cancellation <asyncio_example_task_cancel>`."
msgstr ":ref:`取消任務 <asyncio_example_task_cancel>`。"
#: ../../library/asyncio-api-index.rst:82
msgid ":ref:`Using asyncio.sleep() <asyncio_example_sleep>`."
msgstr ":ref:`使用 asyncio.sleep() <asyncio_example_sleep>`。"
#: ../../library/asyncio-api-index.rst:84
msgid "See also the main :ref:`Tasks documentation page <coroutine>`."
msgstr "請參閱 :ref:`Tasks 文件頁面 <coroutine>`。"
#: ../../library/asyncio-api-index.rst:88
msgid "Queues"
msgstr "佇列 (Queues)"
#: ../../library/asyncio-api-index.rst:90
msgid ""
"Queues should be used to distribute work amongst multiple asyncio Tasks, "
"implement connection pools, and pub/sub patterns."
msgstr ""
"佇列應被用於為多個 asyncio Task 物件分配工作、實作 connection pools(連線池)"
"以及 pub/sub(發行/訂閱)模式。"
#: ../../library/asyncio-api-index.rst:98
msgid ":class:`Queue`"
msgstr ":class:`Queue`"
#: ../../library/asyncio-api-index.rst:99
msgid "A FIFO queue."
msgstr "一個先進先出 (FIFO) 佇列。"
#: ../../library/asyncio-api-index.rst:101
msgid ":class:`PriorityQueue`"
msgstr ":class:`PriorityQueue`"
#: ../../library/asyncio-api-index.rst:102
msgid "A priority queue."
msgstr "一個優先佇列 (priority queue)。"
#: ../../library/asyncio-api-index.rst:104
msgid ":class:`LifoQueue`"
msgstr ":class:`LifoQueue`"
#: ../../library/asyncio-api-index.rst:105
msgid "A LIFO queue."
msgstr "一個後進先出 (LIFO) 佇列。"
#: ../../library/asyncio-api-index.rst:110
msgid ""
":ref:`Using asyncio.Queue to distribute workload between several Tasks "
"<asyncio_example_queue_dist>`."
msgstr ""
":ref:`使用 asyncio.Queue 為多個 Task 分配工作 <asyncio_example_queue_dist>`。"
#: ../../library/asyncio-api-index.rst:113
msgid "See also the :ref:`Queues documentation page <asyncio-queues>`."
msgstr "請參閱\\ :ref:`佇列文件頁面 <asyncio-queues>`。"
#: ../../library/asyncio-api-index.rst:117
msgid "Subprocesses"
msgstr "子行程 (Subprocesses)"
#: ../../library/asyncio-api-index.rst:119
msgid "Utilities to spawn subprocesses and run shell commands."
msgstr "用於衍生(spawn)子行程和執行 shell 指令的工具程式。"
#: ../../library/asyncio-api-index.rst:125
msgid "``await`` :func:`create_subprocess_exec`"
msgstr "``await`` :func:`create_subprocess_exec`"
#: ../../library/asyncio-api-index.rst:126
msgid "Create a subprocess."
msgstr "建立一個子行程。"
#: ../../library/asyncio-api-index.rst:128
msgid "``await`` :func:`create_subprocess_shell`"
msgstr "``await`` :func:`create_subprocess_shell`"
#: ../../library/asyncio-api-index.rst:129
msgid "Run a shell command."
msgstr "執行一個 shell 命令。"
#: ../../library/asyncio-api-index.rst:134
msgid ":ref:`Executing a shell command <asyncio_example_subprocess_shell>`."
msgstr ":ref:`執行一個 shell 指令 <asyncio_example_subprocess_shell>`。"
#: ../../library/asyncio-api-index.rst:136
msgid "See also the :ref:`subprocess APIs <asyncio-subprocess>` documentation."
msgstr "請參閱\\ :ref:`子行程 APIs <asyncio-subprocess>` 相關文件。"
#: ../../library/asyncio-api-index.rst:141
msgid "Streams"
msgstr "串流 (Streams)"
#: ../../library/asyncio-api-index.rst:143
msgid "High-level APIs to work with network IO."
msgstr "用於網路 IO 處理的高階 API。"
#: ../../library/asyncio-api-index.rst:149
msgid "``await`` :func:`open_connection`"
msgstr "``await`` :func:`open_connection`"
#: ../../library/asyncio-api-index.rst:150
msgid "Establish a TCP connection."
msgstr "建立一個 TCP 連線。"
#: ../../library/asyncio-api-index.rst:152
msgid "``await`` :func:`open_unix_connection`"
msgstr "``await`` :func:`open_unix_connection`"
#: ../../library/asyncio-api-index.rst:153
msgid "Establish a Unix socket connection."
msgstr "建立一個 Unix socket 連線。"
#: ../../library/asyncio-api-index.rst:155
msgid "``await`` :func:`start_server`"
msgstr "``await`` :func:`start_server`"
#: ../../library/asyncio-api-index.rst:156
msgid "Start a TCP server."
msgstr "啟動一個 TCP 伺服器。"
#: ../../library/asyncio-api-index.rst:158
msgid "``await`` :func:`start_unix_server`"
msgstr "``await`` :func:`start_unix_server`"
#: ../../library/asyncio-api-index.rst:159
msgid "Start a Unix socket server."
msgstr "啟動一個 Unix socket 伺服器。"
#: ../../library/asyncio-api-index.rst:161
msgid ":class:`StreamReader`"
msgstr ":class:`StreamReader`"
#: ../../library/asyncio-api-index.rst:162
msgid "High-level async/await object to receive network data."
msgstr "接收網路資料的高階 async/await 物件。"
#: ../../library/asyncio-api-index.rst:164
msgid ":class:`StreamWriter`"
msgstr ":class:`StreamWriter`"
#: ../../library/asyncio-api-index.rst:165
msgid "High-level async/await object to send network data."
msgstr "傳送網路資料的高階 async/await 物件。"
#: ../../library/asyncio-api-index.rst:170
msgid ":ref:`Example TCP client <asyncio_example_stream>`."
msgstr ":ref:`TCP 客戶端範例 <asyncio_example_stream>`。"
#: ../../library/asyncio-api-index.rst:172
msgid "See also the :ref:`streams APIs <asyncio-streams>` documentation."
msgstr "請參閱\\ :ref:`串流 APIs <asyncio-streams>` 文件。"
#: ../../library/asyncio-api-index.rst:177
msgid "Synchronization"
msgstr "同步化 (Synchronization)"
#: ../../library/asyncio-api-index.rst:179
msgid "Threading-like synchronization primitives that can be used in Tasks."
msgstr "類似執行緒且能被用於 Task 中的同步化原始物件 (primitive)。"
#: ../../library/asyncio-api-index.rst:185
msgid ":class:`Lock`"
msgstr ":class:`Lock`"
#: ../../library/asyncio-api-index.rst:186
msgid "A mutex lock."
msgstr "一個互斥鎖 (mutex lock)。"
#: ../../library/asyncio-api-index.rst:188
msgid ":class:`Event`"
msgstr ":class:`Event`"
#: ../../library/asyncio-api-index.rst:189
msgid "An event object."
msgstr "一個事件物件。"
#: ../../library/asyncio-api-index.rst:191
msgid ":class:`Condition`"
msgstr ":class:`Condition`"
#: ../../library/asyncio-api-index.rst:192
msgid "A condition object."
msgstr "一個條件物件。"
#: ../../library/asyncio-api-index.rst:194
msgid ":class:`Semaphore`"
msgstr ":class:`Semaphore`"
#: ../../library/asyncio-api-index.rst:195
msgid "A semaphore."
msgstr "一個旗號 (semaphore) 物件。"
#: ../../library/asyncio-api-index.rst:197
msgid ":class:`BoundedSemaphore`"
msgstr ":class:`BoundedSemaphore`"
#: ../../library/asyncio-api-index.rst:198
msgid "A bounded semaphore."
msgstr "一個有界的旗號物件。"
#: ../../library/asyncio-api-index.rst:200
msgid ":class:`Barrier`"
msgstr ":class:`Barrier`"
#: ../../library/asyncio-api-index.rst:201
msgid "A barrier object."
msgstr "一個屏障物件。"
#: ../../library/asyncio-api-index.rst:206
msgid ":ref:`Using asyncio.Event <asyncio_example_sync_event>`."
msgstr ":ref:`使用 asyncio.Event <asyncio_example_sync_event>`。"
#: ../../library/asyncio-api-index.rst:208
msgid ":ref:`Using asyncio.Barrier <asyncio_example_barrier>`."
msgstr ":ref:`使用 asyncio.Barrier <asyncio_example_barrier>`。"
#: ../../library/asyncio-api-index.rst:210
msgid ""
"See also the documentation of asyncio :ref:`synchronization primitives "
"<asyncio-sync>`."
msgstr "請參閱 asyncio 關於\\ :ref:`同步化原始物件 <asyncio-sync>`\\ 的文件。"
#: ../../library/asyncio-api-index.rst:215
msgid "Exceptions"
msgstr "例外"
#: ../../library/asyncio-api-index.rst:222
msgid ":exc:`asyncio.CancelledError`"
msgstr ":exc:`asyncio.CancelledError`"
#: ../../library/asyncio-api-index.rst:223
msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`."
msgstr "當一 Task 物件被取消時被引發。請參閱 :meth:`Task.cancel`。"
#: ../../library/asyncio-api-index.rst:225
msgid ":exc:`asyncio.BrokenBarrierError`"
msgstr ":exc:`asyncio.BrokenBarrierError`"
#: ../../library/asyncio-api-index.rst:226
msgid "Raised when a Barrier is broken. See also :meth:`Barrier.wait`."
msgstr "當一 Barrier 物件損壞時被引發。請參閱 :meth:`Barrier.wait`。"
#: ../../library/asyncio-api-index.rst:231
msgid ""
":ref:`Handling CancelledError to run code on cancellation request "
"<asyncio_example_task_cancel>`."
msgstr ""
":ref:`在取消請求發生的程式中處理 CancelledError 例外 "
"<asyncio_example_task_cancel>`。"
#: ../../library/asyncio-api-index.rst:234
msgid ""
"See also the full list of :ref:`asyncio-specific exceptions <asyncio-"
"exceptions>`."
msgstr "請參閱 :ref:`asyncio 專用例外 <asyncio-exceptions>`\\ 完整列表。"
#~ msgid ""
#~ "Raised on timeout by functions like :func:`wait_for`. Keep in mind that "
#~ "``asyncio.TimeoutError`` is **unrelated** to the built-in :exc:"
#~ "`TimeoutError` exception."
#~ msgstr ""
#~ "在像是 :func:`wait_for` 等函式超時的時候被引發。請注意 ``asyncio."
#~ "TimeoutError`` 與內建例外 :exc:`TimeoutError` **無關**。"