Skip to content

Commit 683fcd0

Browse files
sync with cpython 8f412116
1 parent 2c9679a commit 683fcd0

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

library/asyncio-queue.po

Lines changed: 23 additions & 22 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-07-25 00:16+0000\n"
11+
"POT-Creation-Date: 2025-07-26 00:17+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-"
@@ -193,24 +193,25 @@ msgstr ""
193193
#: ../../library/asyncio-queue.rst:122
194194
msgid ""
195195
"If *immediate* is true, the queue is terminated immediately. The queue is "
196-
"drained to be completely empty. All callers of :meth:`~Queue.join` are "
197-
"unblocked regardless of the number of unfinished tasks. Blocked callers of :"
198-
"meth:`~Queue.get` are unblocked and will raise :exc:`QueueShutDown` because "
199-
"the queue is empty."
196+
"drained to be completely empty and the count of unfinished tasks is reduced "
197+
"by the number of tasks drained. If unfinished tasks is zero, callers of :"
198+
"meth:`~Queue.join` are unblocked. Also, blocked callers of :meth:`~Queue."
199+
"get` are unblocked and will raise :exc:`QueueShutDown` because the queue is "
200+
"empty."
200201
msgstr ""
201202

202-
#: ../../library/asyncio-queue.rst:129
203+
#: ../../library/asyncio-queue.rst:130
203204
msgid ""
204205
"Use caution when using :meth:`~Queue.join` with *immediate* set to true. "
205206
"This unblocks the join even when no work has been done on the tasks, "
206207
"violating the usual invariant for joining a queue."
207208
msgstr ""
208209

209-
#: ../../library/asyncio-queue.rst:137
210+
#: ../../library/asyncio-queue.rst:138
210211
msgid "Indicate that a formerly enqueued work item is complete."
211212
msgstr "表示前面一個排隊的工作項目已經完成。"
212213

213-
#: ../../library/asyncio-queue.rst:139
214+
#: ../../library/asyncio-queue.rst:140
214215
msgid ""
215216
"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work "
216217
"item, a subsequent call to :meth:`task_done` tells the queue that the "
@@ -219,7 +220,7 @@ msgstr ""
219220
"由佇列消耗者使用。對於每個用於取得一個工作項目的 :meth:`~Queue.get`,接續的 :"
220221
"meth:`task_done` 呼叫會告訴佇列這個工作項目的處理已經完成。"
221222

222-
#: ../../library/asyncio-queue.rst:143
223+
#: ../../library/asyncio-queue.rst:144
223224
msgid ""
224225
"If a :meth:`join` is currently blocking, it will resume when all items have "
225226
"been processed (meaning that a :meth:`task_done` call was received for every "
@@ -228,70 +229,70 @@ msgstr ""
228229
"如果 :meth:`join` 目前正在阻塞,在所有項目都被處理後會解除阻塞(意味著每個"
229230
"以 :meth:`~Queue.put` 放進佇列的條目都會收到一個 :meth:`task_done`)。"
230231

231-
#: ../../library/asyncio-queue.rst:148
232+
#: ../../library/asyncio-queue.rst:149
232233
msgid ""
233234
"Raises :exc:`ValueError` if called more times than there were items placed "
234235
"in the queue."
235236
msgstr "如果被呼叫的次數多於放入佇列中的項目數量,將引發 :exc:`ValueError`。"
236237

237-
#: ../../library/asyncio-queue.rst:153
238+
#: ../../library/asyncio-queue.rst:154
238239
msgid "Priority Queue"
239240
msgstr "Priority Queue(優先佇列)"
240241

241-
#: ../../library/asyncio-queue.rst:157
242+
#: ../../library/asyncio-queue.rst:158
242243
msgid ""
243244
"A variant of :class:`Queue`; retrieves entries in priority order (lowest "
244245
"first)."
245246
msgstr ":class:`Queue` 的變形;按優先順序取出條目 (最小的先取出)。"
246247

247-
#: ../../library/asyncio-queue.rst:160
248+
#: ../../library/asyncio-queue.rst:161
248249
msgid "Entries are typically tuples of the form ``(priority_number, data)``."
249250
msgstr "條目通常是 ``(priority_number, data)`` 形式的 tuple(元組)。"
250251

251-
#: ../../library/asyncio-queue.rst:165
252+
#: ../../library/asyncio-queue.rst:166
252253
msgid "LIFO Queue"
253254
msgstr "LIFO Queue"
254255

255-
#: ../../library/asyncio-queue.rst:169
256+
#: ../../library/asyncio-queue.rst:170
256257
msgid ""
257258
"A variant of :class:`Queue` that retrieves most recently added entries first "
258259
"(last in, first out)."
259260
msgstr ":class:`Queue` 的變形,先取出最近新增的條目(後進先出)。"
260261

261-
#: ../../library/asyncio-queue.rst:174
262+
#: ../../library/asyncio-queue.rst:175
262263
msgid "Exceptions"
263264
msgstr "例外"
264265

265-
#: ../../library/asyncio-queue.rst:178
266+
#: ../../library/asyncio-queue.rst:179
266267
msgid ""
267268
"This exception is raised when the :meth:`~Queue.get_nowait` method is called "
268269
"on an empty queue."
269270
msgstr "當佇列為空的時候,呼叫 :meth:`~Queue.get_nowait` 方法會引發這個例外。"
270271

271-
#: ../../library/asyncio-queue.rst:184
272+
#: ../../library/asyncio-queue.rst:185
272273
msgid ""
273274
"Exception raised when the :meth:`~Queue.put_nowait` method is called on a "
274275
"queue that has reached its *maxsize*."
275276
msgstr ""
276277
"當佇列中條目數量已經達到它的 *maxsize* 時,呼叫 :meth:`~Queue.put_nowait` 方"
277278
"法會引發這個例外。"
278279

279-
#: ../../library/asyncio-queue.rst:190
280+
#: ../../library/asyncio-queue.rst:191
280281
msgid ""
281282
"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on "
282283
"a queue which has been shut down."
283284
msgstr ""
284285

285-
#: ../../library/asyncio-queue.rst:197
286+
#: ../../library/asyncio-queue.rst:198
286287
msgid "Examples"
287288
msgstr "範例"
288289

289-
#: ../../library/asyncio-queue.rst:201
290+
#: ../../library/asyncio-queue.rst:202
290291
msgid ""
291292
"Queues can be used to distribute workload between several concurrent tasks::"
292293
msgstr "佇列能被用於多個並行任務的工作分配:"
293294

294-
#: ../../library/asyncio-queue.rst:204
295+
#: ../../library/asyncio-queue.rst:205
295296
msgid ""
296297
"import asyncio\n"
297298
"import random\n"

library/queue.po

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: Python 3.13\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2025-07-25 00:16+0000\n"
13+
"POT-Creation-Date: 2025-07-26 00:17+0000\n"
1414
"PO-Revision-Date: 2022-09-27 00:12+0800\n"
1515
"Last-Translator: Allen Wu <allen91.wu@gmail.com>\n"
1616
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -250,7 +250,7 @@ msgstr ""
250250
msgid "Equivalent to ``put(item, block=False)``."
251251
msgstr "等效於 ``put(item, block=False)``。"
252252

253-
#: ../../library/queue.rst:156 ../../library/queue.rst:313
253+
#: ../../library/queue.rst:156 ../../library/queue.rst:314
254254
msgid ""
255255
"Remove and return an item from the queue. If optional args *block* is true "
256256
"and *timeout* is ``None`` (the default), block if necessary until an item is "
@@ -284,7 +284,7 @@ msgid ""
284284
"the queue has been shut down immediately."
285285
msgstr ""
286286

287-
#: ../../library/queue.rst:174 ../../library/queue.rst:323
287+
#: ../../library/queue.rst:174 ../../library/queue.rst:324
288288
msgid "Equivalent to ``get(False)``."
289289
msgstr "等效於 ``get(False)``。"
290290

@@ -412,36 +412,36 @@ msgstr ""
412412
#: ../../library/queue.rst:258
413413
msgid ""
414414
"If *immediate* is true, the queue is terminated immediately. The queue is "
415-
"drained to be completely empty. All callers of :meth:`~Queue.join` are "
416-
"unblocked regardless of the number of unfinished tasks. Blocked callers of :"
417-
"meth:`~Queue.get` are unblocked and will raise :exc:`ShutDown` because the "
418-
"queue is empty."
415+
"drained to be completely empty and the count of unfinished tasks is reduced "
416+
"by the number of tasks drained. If unfinished tasks is zero, callers of :"
417+
"meth:`~Queue.join` are unblocked. Also, blocked callers of :meth:`~Queue."
418+
"get` are unblocked and will raise :exc:`ShutDown` because the queue is empty."
419419
msgstr ""
420420

421-
#: ../../library/queue.rst:265
421+
#: ../../library/queue.rst:266
422422
msgid ""
423423
"Use caution when using :meth:`~Queue.join` with *immediate* set to true. "
424424
"This unblocks the join even when no work has been done on the tasks, "
425425
"violating the usual invariant for joining a queue."
426426
msgstr ""
427427

428-
#: ../../library/queue.rst:273
428+
#: ../../library/queue.rst:274
429429
msgid "SimpleQueue Objects"
430430
msgstr "SimpleQueue 物件"
431431

432-
#: ../../library/queue.rst:275
432+
#: ../../library/queue.rst:276
433433
msgid ""
434434
":class:`SimpleQueue` objects provide the public methods described below."
435435
msgstr ":class:`SimpleQueue` 物件提供下面描述的公用 method。"
436436

437-
#: ../../library/queue.rst:279
437+
#: ../../library/queue.rst:280
438438
msgid ""
439439
"Return the approximate size of the queue. Note, qsize() > 0 doesn't "
440440
"guarantee that a subsequent get() will not block."
441441
msgstr ""
442442
"傳回佇列的近似大小。注意,qsize() > 0 並不能保證後續的 get() 不會阻塞。"
443443

444-
#: ../../library/queue.rst:285
444+
#: ../../library/queue.rst:286
445445
msgid ""
446446
"Return ``True`` if the queue is empty, ``False`` otherwise. If empty() "
447447
"returns ``False`` it doesn't guarantee that a subsequent call to get() will "
@@ -450,7 +450,7 @@ msgstr ""
450450
"如果佇列為空,則回傳 ``True``,否則回傳 ``False``。如果 empty() 回傳 "
451451
"``False``,則不保證後續呼叫 get() 不會阻塞。"
452452

453-
#: ../../library/queue.rst:292
453+
#: ../../library/queue.rst:293
454454
msgid ""
455455
"Put *item* into the queue. The method never blocks and always succeeds "
456456
"(except for potential low-level errors such as failure to allocate memory). "
@@ -461,7 +461,7 @@ msgstr ""
461461
"像是分配記憶體失敗)。可選的 args *block* 和 *timeout* 會被忽略,它們僅是為了"
462462
"與 :meth:`Queue.put` 相容才存在。"
463463

464-
#: ../../library/queue.rst:298
464+
#: ../../library/queue.rst:299
465465
msgid ""
466466
"This method has a C implementation which is reentrant. That is, a ``put()`` "
467467
"or ``get()`` call can be interrupted by another ``put()`` call in the same "
@@ -474,26 +474,26 @@ msgstr ""
474474
"鎖 (deadlock) 或損壞佇列中的內部狀態。這使得它適合在解構子 (destructor) 中使"
475475
"用,像是 ``__del__`` method 或 :mod:`weakref` 回呼函式 (callback)。"
476476

477-
#: ../../library/queue.rst:307
477+
#: ../../library/queue.rst:308
478478
msgid ""
479479
"Equivalent to ``put(item, block=False)``, provided for compatibility with :"
480480
"meth:`Queue.put_nowait`."
481481
msgstr ""
482482
"等效於 ``put(item, block=False)``,用於與 :meth:`Queue.put_nowait` 相容。"
483483

484-
#: ../../library/queue.rst:328
484+
#: ../../library/queue.rst:329
485485
msgid "Class :class:`multiprocessing.Queue`"
486486
msgstr "Class :class:`multiprocessing.Queue`"
487487

488-
#: ../../library/queue.rst:329
488+
#: ../../library/queue.rst:330
489489
msgid ""
490490
"A queue class for use in a multi-processing (rather than multi-threading) "
491491
"context."
492492
msgstr ""
493493
"用於多行程處理 (multi-processing)(而非多執行緒)情境 (context) 的佇列 "
494494
"class。"
495495

496-
#: ../../library/queue.rst:332
496+
#: ../../library/queue.rst:333
497497
msgid ""
498498
":class:`collections.deque` is an alternative implementation of unbounded "
499499
"queues with fast atomic :meth:`~collections.deque.append` and :meth:"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy