1
- # SOME DESCRIPTIVE TITLE.
2
1
# Copyright (C) 2001-2022, Python Software Foundation
3
2
# This file is distributed under the same license as the Python package.
4
3
#
5
4
# Translators:
5
+ # Adrian Liaw <adrianliaw2000@gmail.com>, 2018
6
+ # Matt Wang <mattwang44@gmail.com>, 2022
6
7
msgid ""
7
8
msgstr ""
8
9
"Project-Id-Version : Python 3.10\n "
9
10
"Report-Msgid-Bugs-To : \n "
10
11
"POT-Creation-Date : 2022-02-19 00:13+0000\n "
11
- "PO-Revision-Date : 2018-05-23 14:39+0000 \n "
12
- "Last-Translator : Adrian Liaw <adrianliaw2000 @gmail.com>\n "
12
+ "PO-Revision-Date : 2022-02-20 18:34+0800 \n "
13
+ "Last-Translator : Matt Wang <mattwang44 @gmail.com>\n "
13
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
15
"tw)\n "
15
16
"Language : zh_TW\n "
16
17
"MIME-Version : 1.0\n "
17
18
"Content-Type : text/plain; charset=UTF-8\n "
18
19
"Content-Transfer-Encoding : 8bit\n "
19
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
+ "X-Generator : Poedit 3.0.1\n "
20
22
21
23
#: ../../library/asyncio-queue.rst:7
22
24
msgid "Queues"
23
- msgstr ""
25
+ msgstr "佇列 (Queues) "
24
26
25
27
#: ../../library/asyncio-queue.rst:9
26
28
msgid "**Source code:** :source:`Lib/asyncio/queues.py`"
@@ -32,78 +34,89 @@ msgid ""
32
34
"module. Although asyncio queues are not thread-safe, they are designed to "
33
35
"be used specifically in async/await code."
34
36
msgstr ""
37
+ "asyncio 佇列被設計成與 :mod:`queue` 模組類似。儘管 asyncio 佇列不支援執行緒安"
38
+ "全 (thread-safe),但他們是被設計來專用於 async/await 程式。"
35
39
36
40
#: ../../library/asyncio-queue.rst:17
37
41
msgid ""
38
42
"Note that methods of asyncio queues don't have a *timeout* parameter; use :"
39
43
"func:`asyncio.wait_for` function to do queue operations with a timeout."
40
44
msgstr ""
45
+ "注意 asyncio 的佇列沒有 *timeout* 參��;請使用 :func:`asyncio.wait_for` 函式"
46
+ "來為佇列新增具有超時 (timeout) 設定的操作。"
41
47
42
48
#: ../../library/asyncio-queue.rst:21
43
49
msgid "See also the `Examples`_ section below."
44
- msgstr "另請參閱下方\\ `Examples`_\\ 。"
50
+ msgstr "另請參閱下方 `Examples`_\\ 。"
45
51
46
52
#: ../../library/asyncio-queue.rst:24
47
53
msgid "Queue"
48
- msgstr ""
54
+ msgstr "Queue "
49
55
50
56
#: ../../library/asyncio-queue.rst:28
51
57
msgid "A first in, first out (FIFO) queue."
52
- msgstr ""
58
+ msgstr "先進先出 (FIFO) 佇列。 "
53
59
54
60
#: ../../library/asyncio-queue.rst:30
55
61
msgid ""
56
62
"If *maxsize* is less than or equal to zero, the queue size is infinite. If "
57
63
"it is an integer greater than ``0``, then ``await put()`` blocks when the "
58
64
"queue reaches *maxsize* until an item is removed by :meth:`get`."
59
65
msgstr ""
66
+ "如果 *maxsize* 小於或等於零,則佇列尺寸是無限制的。如果是��於 ``0`` 的整數,"
67
+ "則當佇列達到 *maxsize* 時,\\ ``await put()`` 將會阻塞 (block),直到某個元素"
68
+ "被 :meth:`get` 取出。"
60
69
61
70
#: ../../library/asyncio-queue.rst:35
62
71
msgid ""
63
72
"Unlike the standard library threading :mod:`queue`, the size of the queue is "
64
73
"always known and can be returned by calling the :meth:`qsize` method."
65
74
msgstr ""
75
+ "不像標準函式庫中執行緒類型的 :mod:`queue`\\ ,佇列的尺寸一直是已知的,可以透"
76
+ "過呼叫 :meth:`qsize` 方法回傳。"
66
77
67
78
#: ../../library/asyncio-queue.rst:39
68
79
msgid "Removed the *loop* parameter."
69
- msgstr ""
80
+ msgstr "移除 *loop* 參數。 "
70
81
71
82
#: ../../library/asyncio-queue.rst:43
72
83
msgid "This class is :ref:`not thread safe <asyncio-multithreading>`."
73
- msgstr ""
84
+ msgstr "這個類別是 \\ :ref:`不支援執行緒安全的 <asyncio-multithreading>` \\ 。 "
74
85
75
86
#: ../../library/asyncio-queue.rst:47
76
87
msgid "Number of items allowed in the queue."
77
- msgstr ""
88
+ msgstr "佇列中可存放的元素數量。 "
78
89
79
90
#: ../../library/asyncio-queue.rst:51
80
91
msgid "Return ``True`` if the queue is empty, ``False`` otherwise."
81
- msgstr ""
92
+ msgstr "如果佇列為空則回傳 ``True`` \\ ,否則回傳 ``False`` \\ 。 "
82
93
83
94
#: ../../library/asyncio-queue.rst:55
84
95
msgid "Return ``True`` if there are :attr:`maxsize` items in the queue."
85
- msgstr ""
96
+ msgstr "如果有 :attr:`maxsize` 個條目在佇列中,則回傳 ``True`` \\ 。 "
86
97
87
98
#: ../../library/asyncio-queue.rst:57
88
99
msgid ""
89
100
"If the queue was initialized with ``maxsize=0`` (the default), then :meth:"
90
101
"`full()` never returns ``True``."
91
102
msgstr ""
103
+ "如果佇列用 ``maxsize=0`` (預設)初始化,則 :meth:`full()` 永遠不會回傳 "
104
+ "``True``\\ 。"
92
105
93
106
#: ../../library/asyncio-queue.rst:62
94
107
msgid ""
95
108
"Remove and return an item from the queue. If queue is empty, wait until an "
96
109
"item is available."
97
- msgstr ""
110
+ msgstr "從佇列中刪除並回傳一個元素。如果佇列為空,則持續等待直到佇列中有元素。 "
98
111
99
112
#: ../../library/asyncio-queue.rst:67
100
113
msgid ""
101
114
"Return an item if one is immediately available, else raise :exc:`QueueEmpty`."
102
- msgstr ""
115
+ msgstr "如果佇列內有值則立即回傳佇列中的元素,否則引發 :exc:`QueueEmpty` \\ 。 "
103
116
104
117
#: ../../library/asyncio-queue.rst:72
105
118
msgid "Block until all items in the queue have been received and processed."
106
- msgstr ""
119
+ msgstr "持續阻塞直到佇列中所有的元素都被接收和處理完畢。 "
107
120
108
121
#: ../../library/asyncio-queue.rst:74
109
122
msgid ""
@@ -113,72 +126,83 @@ msgid ""
113
126
"complete. When the count of unfinished tasks drops to zero, :meth:`join` "
114
127
"unblocks."
115
128
msgstr ""
129
+ "當條目新增到佇列的時候,未完成任務的計數就會增加。每當一個消耗者 (consumer) "
130
+ "協程呼叫 :meth:`task_done`\\ ,表示這個條目已經被取回且被它包含的所有工作都已"
131
+ "完成,未完成任務計數就會減少。當未完成計數降到零的時候,\\ :meth:`join` 阻塞"
132
+ "會被解除 (unblock)。"
116
133
117
134
#: ../../library/asyncio-queue.rst:82
118
135
msgid ""
119
136
"Put an item into the queue. If the queue is full, wait until a free slot is "
120
137
"available before adding the item."
121
138
msgstr ""
139
+ "將一個元素放進佇列。如果佇列滿了,在新增元素之前,會持續等待直到有空閒插槽 "
140
+ "(free slot) 能被使用。"
122
141
123
142
#: ../../library/asyncio-queue.rst:87
124
143
msgid "Put an item into the queue without blocking."
125
- msgstr ""
144
+ msgstr "不阻塞地將一個元素放入佇列。 "
126
145
127
146
#: ../../library/asyncio-queue.rst:89
128
147
msgid "If no free slot is immediately available, raise :exc:`QueueFull`."
129
- msgstr ""
148
+ msgstr "如果沒有立即可用的空閒插槽,引發 :exc:`QueueFull` \\ 。 "
130
149
131
150
#: ../../library/asyncio-queue.rst:93
132
151
msgid "Return the number of items in the queue."
133
- msgstr ""
152
+ msgstr "回傳佇列中的元素數量。 "
134
153
135
154
#: ../../library/asyncio-queue.rst:97
136
155
msgid "Indicate that a formerly enqueued task is complete."
137
- msgstr ""
156
+ msgstr "表示前面一個排隊的任務已經完成。 "
138
157
139
158
#: ../../library/asyncio-queue.rst:99
140
159
msgid ""
141
160
"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a task, a "
142
161
"subsequent call to :meth:`task_done` tells the queue that the processing on "
143
162
"the task is complete."
144
163
msgstr ""
164
+ "由佇列消耗者使用。對於每個用於獲取一個任務的 :meth:`~Queue.get`\\ ,接續的 :"
165
+ "meth:`task_done` 呼叫會告訴佇列這個任務的處理已經完成。"
145
166
146
167
#: ../../library/asyncio-queue.rst:103
147
168
msgid ""
148
169
"If a :meth:`join` is currently blocking, it will resume when all items have "
149
170
"been processed (meaning that a :meth:`task_done` call was received for every "
150
171
"item that had been :meth:`~Queue.put` into the queue)."
151
172
msgstr ""
173
+ "如果 :meth:`join` 當前正在阻塞,在所有項目都被處理後會解除阻塞(意味著每個"
174
+ "以 :meth:`~Queue.put` 放進佇列的條目都會收到一個 :meth:`task_done`\\ )。"
152
175
153
176
#: ../../library/asyncio-queue.rst:108
154
177
msgid ""
155
178
"Raises :exc:`ValueError` if called more times than there were items placed "
156
179
"in the queue."
157
180
msgstr ""
181
+ "如果被呼叫的次數多於放入佇列中的項目數量,將引發 :exc:`ValueError`\\ 。"
158
182
159
183
#: ../../library/asyncio-queue.rst:113
160
184
msgid "Priority Queue"
161
- msgstr ""
185
+ msgstr "Priority Queue(優先佇列) "
162
186
163
187
#: ../../library/asyncio-queue.rst:117
164
188
msgid ""
165
189
"A variant of :class:`Queue`; retrieves entries in priority order (lowest "
166
190
"first)."
167
- msgstr ""
191
+ msgstr ":class:`Queue` 的變形;按優先順序取出條目 (最小的先取出)。 "
168
192
169
193
#: ../../library/asyncio-queue.rst:120
170
194
msgid "Entries are typically tuples of the form ``(priority_number, data)``."
171
- msgstr ""
195
+ msgstr "條目通常是 ``(priority_number, data)`` 形式的 tuple(元組)。 "
172
196
173
197
#: ../../library/asyncio-queue.rst:125
174
198
msgid "LIFO Queue"
175
- msgstr ""
199
+ msgstr "LIFO Queue "
176
200
177
201
#: ../../library/asyncio-queue.rst:129
178
202
msgid ""
179
203
"A variant of :class:`Queue` that retrieves most recently added entries first "
180
204
"(last in, first out)."
181
- msgstr ""
205
+ msgstr ":class:`Queue` 的變形,先取出最近新增的條目(後進先出)。 "
182
206
183
207
#: ../../library/asyncio-queue.rst:134
184
208
msgid "Exceptions"
@@ -188,13 +212,15 @@ msgstr "例外"
188
212
msgid ""
189
213
"This exception is raised when the :meth:`~Queue.get_nowait` method is called "
190
214
"on an empty queue."
191
- msgstr ""
215
+ msgstr "當佇列為空的時候,呼叫 :meth:`~Queue.get_nowait` 方法會引發這個例外。 "
192
216
193
217
#: ../../library/asyncio-queue.rst:144
194
218
msgid ""
195
219
"Exception raised when the :meth:`~Queue.put_nowait` method is called on a "
196
220
"queue that has reached its *maxsize*."
197
221
msgstr ""
222
+ "當佇列中條目數量已經達到它的 *maxsize* 時,呼叫 :meth:`~Queue.put_nowait` 方"
223
+ "法會引發這個例外。"
198
224
199
225
#: ../../library/asyncio-queue.rst:149
200
226
msgid "Examples"
@@ -203,4 +229,4 @@ msgstr "範例"
203
229
#: ../../library/asyncio-queue.rst:153
204
230
msgid ""
205
231
"Queues can be used to distribute workload between several concurrent tasks::"
206
- msgstr ""
232
+ msgstr "佇列能被用於多個並行任務的工作分配: "
0 commit comments