Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita26f218

Browse files
sync with cpython 6abec03a
1 parentbda3476 commita26f218

10 files changed

+1837
-1855
lines changed

‎library/asyncio-eventloop.po

Lines changed: 672 additions & 690 deletions
Large diffs are not rendered by default.

‎library/asyncio-queue.po

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version:Python 3.13\n"
1010
"Report-Msgid-Bugs-To:\n"
11-
"POT-Creation-Date:2025-01-10 00:14+0000\n"
11+
"POT-Creation-Date:2025-02-23 00:15+0000\n"
1212
"PO-Revision-Date:2022-02-20 18:34+0800\n"
1313
"Last-Translator:Matt Wang <mattwang44@gmail.com>\n"
1414
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -39,8 +39,8 @@ msgstr ""
3939

4040
#:../../library/asyncio-queue.rst:17
4141
msgid""
42-
"Note that methods of asyncio queues don't have a *timeout* parameter; "
43-
"use :func:`asyncio.wait_for` function to do queue operations with a timeout."
42+
"Note that methods of asyncio queues don't have a *timeout* parameter;use :"
43+
"func:`asyncio.wait_for` function to do queue operations with a timeout."
4444
msgstr""
4545
"注意 asyncio 的佇列沒有 *timeout* 參數;請使用 :func:`asyncio.wait_for` 函式"
4646
"來為佇列新增具有超時 (timeout) 設定的操作。"
@@ -64,8 +64,8 @@ msgid ""
6464
"queue reaches *maxsize* until an item is removed by :meth:`get`."
6565
msgstr""
6666
"如果 *maxsize* 小於或等於零,則佇列大小是無限制的。如果是大於 ``0`` 的整數,"
67-
"則當佇列達到 *maxsize* 時,``await put()`` 將會阻塞 (block),直到某個元素"
68-
"被 :meth:`get` 取出。"
67+
"則當佇列達到 *maxsize* 時,``await put()`` 將會阻塞 (block),直到某個元素被 :"
68+
"meth:`get` 取出。"
6969

7070
#:../../library/asyncio-queue.rst:35
7171
msgid""
@@ -97,105 +97,105 @@ msgstr "如果有 :attr:`maxsize` 個條目在佇列中,則回傳 ``True``。"
9797

9898
#:../../library/asyncio-queue.rst:57
9999
msgid""
100-
"If the queue was initialized with ``maxsize=0`` (the default), "
101-
"then :meth:`full` never returns ``True``."
100+
"If the queue was initialized with ``maxsize=0`` (the default),then :meth:"
101+
"`full` never returns ``True``."
102102
msgstr""
103103
"如果佇列用 ``maxsize=0`` (預設)初始化,則 :meth:`full` 永遠不會回傳 "
104104
"``True``。"
105105

106-
#:../../library/asyncio-queue.rst:62
106+
#:../../library/asyncio-queue.rst:63
107107
msgid""
108108
"Remove and return an item from the queue. If queue is empty, wait until an "
109109
"item is available."
110110
msgstr"從佇列中刪除並回傳一個元素。如果佇列為空,則持續等待直到佇列中有元素。"
111111

112-
#:../../library/asyncio-queue.rst:65
112+
#:../../library/asyncio-queue.rst:66
113113
msgid""
114114
"Raises :exc:`QueueShutDown` if the queue has been shut down and is empty, or "
115115
"if the queue has been shut down immediately."
116116
msgstr""
117117

118-
#:../../library/asyncio-queue.rst:70
118+
#:../../library/asyncio-queue.rst:71
119119
msgid""
120120
"Return an item if one is immediately available, else raise :exc:`QueueEmpty`."
121121
msgstr"如果佇列內有值則立即回傳佇列中的元素,否則引發 :exc:`QueueEmpty`。"
122122

123-
#:../../library/asyncio-queue.rst:75
123+
#:../../library/asyncio-queue.rst:77
124124
msgid"Block until all items in the queue have been received and processed."
125125
msgstr"持續阻塞直到佇列中所有的元素都被接收和處理完畢。"
126126

127-
#:../../library/asyncio-queue.rst:77
127+
#:../../library/asyncio-queue.rst:79
128128
msgid""
129129
"The count of unfinished tasks goes up whenever an item is added to the "
130-
"queue. The count goes down whenever a consumer coroutine "
131-
"calls :meth:`task_done` to indicate that the item was retrieved and all work "
132-
"on it iscomplete. When the count of unfinished tasks drops to "
133-
"zero, :meth:`join`unblocks."
130+
"queue. The count goes down whenever a consumer coroutinecalls :meth:"
131+
"`task_done` to indicate that the item was retrieved and all work on it is "
132+
"complete. When the count of unfinished tasks drops to zero, :meth:`join` "
133+
"unblocks."
134134
msgstr""
135135
"當條目新增到佇列的時候,未完成任務的計數就會增加。每當一個消耗者 (consumer) "
136136
"協程呼叫 :meth:`task_done`,表示這個條目已經被取回且被它包含的所有工作都已完"
137137
"成,未完成任務計數就會減少。當未完成計數降到零的時候,:meth:`join` 阻塞會被解"
138138
"除 (unblock)。"
139139

140-
#:../../library/asyncio-queue.rst:85
140+
#:../../library/asyncio-queue.rst:88
141141
msgid""
142142
"Put an item into the queue. If the queue is full, wait until a free slot is "
143143
"available before adding the item."
144144
msgstr""
145145
"將一個元素放進佇列。如果佇列滿了,在新增元素之前,會持續等待直到有空閒插槽 "
146146
"(free slot) 能被使用。"
147147

148-
#:../../library/asyncio-queue.rst:88
148+
#:../../library/asyncio-queue.rst:91
149149
msgid"Raises :exc:`QueueShutDown` if the queue has been shut down."
150150
msgstr"如果佇列已經被關閉,則引發 :exc:`QueueShutDown`。"
151151

152-
#:../../library/asyncio-queue.rst:92
152+
#:../../library/asyncio-queue.rst:95
153153
msgid"Put an item into the queue without blocking."
154154
msgstr"不阻塞地將一個元素放入佇列。"
155155

156-
#:../../library/asyncio-queue.rst:94
156+
#:../../library/asyncio-queue.rst:97
157157
msgid"If no free slot is immediately available, raise :exc:`QueueFull`."
158158
msgstr"如果沒有立即可用的空閒插槽,引發 :exc:`QueueFull`。"
159159

160-
#:../../library/asyncio-queue.rst:98
160+
#:../../library/asyncio-queue.rst:101
161161
msgid"Return the number of items in the queue."
162162
msgstr"回傳佇列中的元素數量。"
163163

164-
#:../../library/asyncio-queue.rst:102
164+
#:../../library/asyncio-queue.rst:105
165165
msgid""
166-
"Shut down the queue, making :meth:`~Queue.get` and :meth:`~Queue.put` "
167-
"raise :exc:`QueueShutDown`."
166+
"Shut down the queue, making :meth:`~Queue.get` and :meth:`~Queue.put`raise :"
167+
"exc:`QueueShutDown`."
168168
msgstr""
169169

170-
#:../../library/asyncio-queue.rst:105
170+
#:../../library/asyncio-queue.rst:108
171171
msgid""
172172
"By default, :meth:`~Queue.get` on a shut down queue will only raise once the "
173173
"queue is empty. Set *immediate* to true to make :meth:`~Queue.get` raise "
174174
"immediately instead."
175175
msgstr""
176176

177-
#:../../library/asyncio-queue.rst:109
177+
#:../../library/asyncio-queue.rst:112
178178
msgid""
179179
"All blocked callers of :meth:`~Queue.put` and :meth:`~Queue.get` will be "
180180
"unblocked. If *immediate* is true, a task will be marked as done for each "
181-
"remaining item in the queue, which may unblock callers "
182-
"of :meth:`~Queue.join`."
181+
"remaining item in the queue, which may unblock callersof :meth:`~Queue."
182+
"join`."
183183
msgstr""
184184

185-
#:../../library/asyncio-queue.rst:118
185+
#:../../library/asyncio-queue.rst:121
186186
msgid"Indicate that a formerly enqueued work item is complete."
187187
msgstr"表示前面一個排隊的工作項目已經完成。"
188188

189-
#:../../library/asyncio-queue.rst:120
189+
#:../../library/asyncio-queue.rst:123
190190
msgid""
191191
"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work "
192192
"item, a subsequent call to :meth:`task_done` tells the queue that the "
193193
"processing on the work item is complete."
194194
msgstr""
195-
"由佇列消耗者使用。對於每個用於獲取一個工作項目的 :meth:`~Queue.get`,接續"
196-
"的 :meth:`task_done` 呼叫會告訴佇列這個工作項目的處理已經完成。"
195+
"由佇列消耗者使用。對於每個用於獲取一個工作項目的 :meth:`~Queue.get`,接續的 :"
196+
"meth:`task_done` 呼叫會告訴佇列這個工作項目的處理已經完成。"
197197

198-
#:../../library/asyncio-queue.rst:124
198+
#:../../library/asyncio-queue.rst:127
199199
msgid""
200200
"If a :meth:`join` is currently blocking, it will resume when all items have "
201201
"been processed (meaning that a :meth:`task_done` call was received for every "
@@ -204,76 +204,76 @@ msgstr ""
204204
"如果 :meth:`join` 當前正在阻塞,在所有項目都被處理後會解除阻塞(意味著每個"
205205
"以 :meth:`~Queue.put` 放進佇列的條目都會收到一個 :meth:`task_done`)。"
206206

207-
#:../../library/asyncio-queue.rst:129
207+
#:../../library/asyncio-queue.rst:132
208208
msgid""
209209
"``shutdown(immediate=True)`` calls :meth:`task_done` for each remaining item "
210210
"in the queue."
211211
msgstr""
212212

213-
#:../../library/asyncio-queue.rst:132
213+
#:../../library/asyncio-queue.rst:135
214214
msgid""
215215
"Raises :exc:`ValueError` if called more times than there were items placed "
216216
"in the queue."
217217
msgstr"如果被呼叫的次數多於放入佇列中的項目數量,將引發 :exc:`ValueError`。"
218218

219-
#:../../library/asyncio-queue.rst:137
219+
#:../../library/asyncio-queue.rst:140
220220
msgid"Priority Queue"
221221
msgstr"Priority Queue(優先佇列)"
222222

223-
#:../../library/asyncio-queue.rst:141
223+
#:../../library/asyncio-queue.rst:144
224224
msgid""
225225
"A variant of :class:`Queue`; retrieves entries in priority order (lowest "
226226
"first)."
227227
msgstr":class:`Queue` 的變形;按優先順序取出條目 (最小的先取出)。"
228228

229-
#:../../library/asyncio-queue.rst:144
229+
#:../../library/asyncio-queue.rst:147
230230
msgid"Entries are typically tuples of the form ``(priority_number, data)``."
231231
msgstr"條目通常是 ``(priority_number, data)`` 形式的 tuple(元組)。"
232232

233-
#:../../library/asyncio-queue.rst:149
233+
#:../../library/asyncio-queue.rst:152
234234
msgid"LIFO Queue"
235235
msgstr"LIFO Queue"
236236

237-
#:../../library/asyncio-queue.rst:153
237+
#:../../library/asyncio-queue.rst:156
238238
msgid""
239239
"A variant of :class:`Queue` that retrieves most recently added entries first "
240240
"(last in, first out)."
241241
msgstr":class:`Queue` 的變形,先取出最近新增的條目(後進先出)。"
242242

243-
#:../../library/asyncio-queue.rst:158
243+
#:../../library/asyncio-queue.rst:161
244244
msgid"Exceptions"
245245
msgstr"例外"
246246

247-
#:../../library/asyncio-queue.rst:162
247+
#:../../library/asyncio-queue.rst:165
248248
msgid""
249249
"This exception is raised when the :meth:`~Queue.get_nowait` method is called "
250250
"on an empty queue."
251251
msgstr"當佇列為空的時候,呼叫 :meth:`~Queue.get_nowait` 方法會引發這個例外。"
252252

253-
#:../../library/asyncio-queue.rst:168
253+
#:../../library/asyncio-queue.rst:171
254254
msgid""
255255
"Exception raised when the :meth:`~Queue.put_nowait` method is called on a "
256256
"queue that has reached its *maxsize*."
257257
msgstr""
258258
"當佇列中條目數量已經達到它的 *maxsize* 時,呼叫 :meth:`~Queue.put_nowait` 方"
259259
"法會引發這個例外。"
260260

261-
#:../../library/asyncio-queue.rst:174
261+
#:../../library/asyncio-queue.rst:177
262262
msgid""
263263
"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on "
264264
"a queue which has been shut down."
265265
msgstr""
266266

267-
#:../../library/asyncio-queue.rst:181
267+
#:../../library/asyncio-queue.rst:184
268268
msgid"Examples"
269269
msgstr"範例"
270270

271-
#:../../library/asyncio-queue.rst:185
271+
#:../../library/asyncio-queue.rst:188
272272
msgid""
273273
"Queues can be used to distribute workload between several concurrent tasks::"
274274
msgstr"佇列能被用於多個並行任務的工作分配:"
275275

276-
#:../../library/asyncio-queue.rst:188
276+
#:../../library/asyncio-queue.rst:191
277277
msgid""
278278
"import asyncio\n"
279279
"import random\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp