@@ -223,14 +223,14 @@ msgstr "運行事件迴圈直到 :meth:`stop` 被呼叫。"
223
223
224
224
#: ../../library/asyncio-eventloop.rst:129
225
225
msgid ""
226
- "If :meth:`stop` is called before :meth:`run_forever() ` is called, the loop "
226
+ "If :meth:`stop` is called before :meth:`run_forever` is called, the loop "
227
227
"will poll the I/O selector once with a timeout of zero, run all callbacks "
228
228
"scheduled in response to I/O events (and those that were already scheduled), "
229
229
"and then exit."
230
230
msgstr ""
231
- "如果在呼叫 :meth:`run_forever() ` 之前呼叫 :meth:`stop`,則迴圈將使用超時為零 "
232
- "的方式輪詢 I/O 選擇器,運行所有回應 I/O 事件(以及已經排程的事件)的回呼函 "
233
- "數, 然後退出。"
231
+ "如果在呼叫 :meth:`run_forever` 之前呼叫 :meth:`stop`,則迴圈將使用超時為零的 "
232
+ "方式輪詢 I/O 選擇器,運行所有回應 I/O 事件(以及已經排程的事件)的回呼函數, "
233
+ "然後退出。"
234
234
235
235
#: ../../library/asyncio-eventloop.rst:134
236
236
msgid ""
@@ -281,13 +281,13 @@ msgstr "此方法是冪等且不可逆的。在事件迴圈關閉後不應呼叫
281
281
#: ../../library/asyncio-eventloop.rst:167
282
282
msgid ""
283
283
"Schedule all currently open :term:`asynchronous generator` objects to close "
284
- "with an :meth:`~agen.aclose() ` call. After calling this method, the event "
284
+ "with an :meth:`~agen.aclose` call. After calling this method, the event "
285
285
"loop will issue a warning if a new asynchronous generator is iterated. This "
286
286
"should be used to reliably finalize all scheduled asynchronous generators."
287
287
msgstr ""
288
288
"排程所有當前打開的\\ :term:`非同步產生器 <asynchronous generator>`\\ 物件使"
289
- "用 :meth:`~agen.aclose() ` 呼叫來關閉。呼叫此方法後,如果疊代新的非同步產生 "
290
- "器, 事件迴圈將發出警告。應該使用此方法可靠地完成所有已排程的非同步產生器。"
289
+ "用 :meth:`~agen.aclose` 呼叫來關閉。呼叫此方法後,如果疊代新的非同步產生器, "
290
+ "事件迴圈將發出警告。應該使用此方法可靠地完成所有已排程的非同步產生器。"
291
291
292
292
#: ../../library/asyncio-eventloop.rst:173
293
293
msgid ""
@@ -351,8 +351,7 @@ msgid ""
351
351
"Schedule the *callback* :term:`callback` to be called with *args* arguments "
352
352
"at the next iteration of the event loop."
353
353
msgstr ""
354
- "在事件迴圈的下一次疊代中排程以 *args* 引數呼叫 *callback* :term:"
355
- "`callback`。"
354
+ "在事件迴圈的下一次疊代中排程以 *args* 引數呼叫 *callback* :term:`callback`。"
356
355
357
356
#: ../../library/asyncio-eventloop.rst:221
358
357
msgid ""
@@ -385,8 +384,8 @@ msgid ""
385
384
"another thread, this function *must* be used, since :meth:`call_soon` is not "
386
385
"thread-safe."
387
386
msgstr ""
388
- "這是 :meth:`call_soon` 的執行緒安全變體。當從另一個執行緒排程回呼函式時,*必須*\ "
389
- "使用此函式,因為 :meth:`call_soon` 不是執行緒安全的。"
387
+ "這是 :meth:`call_soon` 的執行緒安全變體。當從另一個執行緒排程回呼函式時,*必 "
388
+ "須* \\ 使用此函式,因為 :meth:`call_soon` 不是執行緒安全的。"
390
389
391
390
#: ../../library/asyncio-eventloop.rst:239
392
391
msgid ""
@@ -456,8 +455,8 @@ msgid ""
456
455
"*callback* will be called exactly once. If two callbacks are scheduled for "
457
456
"exactly the same time, the order in which they are called is undefined."
458
457
msgstr ""
459
- "*callback* 將只被呼叫恰好一次。如果有兩個回呼函式被排程在完全相同的時間,則其呼叫 "
460
- "順序是不定的 。"
458
+ "*callback* 將只被呼叫恰好一次。如果有兩個回呼函式被排程在完全相同的時間,則其 "
459
+ "呼叫順序是不定的 。"
461
460
462
461
#: ../../library/asyncio-eventloop.rst:288
463
462
msgid ""
@@ -482,8 +481,8 @@ msgid ""
482
481
"In Python 3.7 and earlier with the default event loop implementation, the "
483
482
"*delay* could not exceed one day. This has been fixed in Python 3.8."
484
483
msgstr ""
485
- "在 Python 3.7 及更早版本中,使用預設事件迴圈實作時,*delay* 不能超過一天。這在 "
486
- "Python 3.8 中已經修復。"
484
+ "在 Python 3.7 及更早版本中,使用預設事件迴圈實作時,*delay* 不能超過一天。這 "
485
+ "在 Python 3.8 中已經修復。"
487
486
488
487
#: ../../library/asyncio-eventloop.rst:307
489
488
msgid ""
@@ -503,8 +502,8 @@ msgid ""
503
502
"difference between *when* and the current time could not exceed one day. "
504
503
"This has been fixed in Python 3.8."
505
504
msgstr ""
506
- "在 Python 3.7 及更早版本中,使用預設事件迴圈實作時,*when* 和當前時間之間的差值 "
507
- "不能超過一天 。這在 Python 3.8 中已經修復。"
505
+ "在 Python 3.7 及更早版本中,使用預設事件迴圈實作時,*when* 和當前時間之間的差 "
506
+ "值不能超過一天 。這在 Python 3.8 中已經修復。"
508
507
509
508
#: ../../library/asyncio-eventloop.rst:327
510
509
msgid ""
@@ -633,8 +632,8 @@ msgid ""
633
632
"*protocol_factory* must be a callable returning an :ref:`asyncio protocol "
634
633
"<asyncio-protocol>` implementation."
635
634
msgstr ""
636
- "*protocol_factory* 必須是一個回傳 :ref:`asyncio protocol "
637
- "<asyncio-protocol>` 實作的可呼叫函式。"
635
+ "*protocol_factory* 必須是一個回傳 :ref:`asyncio protocol <asyncio-protocol>` "
636
+ "實作的可呼叫函式。"
638
637
639
638
#: ../../library/asyncio-eventloop.rst:415
640
639
msgid ""
@@ -937,8 +936,8 @@ msgid ""
937
936
"are looked up using :meth:`getaddrinfo`."
938
937
msgstr ""
939
938
"*remote_addr*,如果提供,是一個 ``(remote_host, remote_port)`` 元組,用於將 "
940
- "socket 連線到遠端位址。 *remote_host* 和 *remote_port* 使用 :meth:`getaddrinfo` "
941
- "來查找。"
939
+ "socket 連線到遠端位址。 *remote_host* 和 *remote_port* 使用 :meth:"
940
+ "`getaddrinfo` 來查找。"
942
941
943
942
#: ../../library/asyncio-eventloop.rst:576
944
943
msgid ""
@@ -1133,8 +1132,8 @@ msgid ""
1133
1132
"different random port will be selected for each interface)."
1134
1133
msgstr ""
1135
1134
"可以設定 *port* 參數以指定伺服器應該監聽的埠。如果是 ``0`` 或 ``None``\\ (預"
1136
- "設值),將隨機選擇一個未使用的埠(請注意,如果 *host* 解析為多個網路介 "
1137
- "面,將為每個介面隨機選擇不同的隨機埠 )。"
1135
+ "設值),將隨機選擇一個未使用的埠(請注意,如果 *host* 解析為多個網路介面,將 "
1136
+ "為每個介面隨機選擇不同的隨機埠 )。"
1138
1137
1139
1138
#: ../../library/asyncio-eventloop.rst:706
1140
1139
msgid ""
@@ -1187,8 +1186,8 @@ msgid ""
1187
1186
"state, without waiting for its natural timeout to expire. If not specified "
1188
1187
"will automatically be set to ``True`` on Unix."
1189
1188
msgstr ""
1190
- "*reuse_address* 告訴內核重用 ``TIME_WAIT`` 狀態下的本地 socket,而不等待其自然 "
1191
- "超時過期 。如果未指定,在 Unix 上將自動設置為 ``True``。"
1189
+ "*reuse_address* 告訴內核重用 ``TIME_WAIT`` 狀態下的本地 socket,而不等待其自 "
1190
+ "然超時過期 。如果未指定,在 Unix 上將自動設置為 ``True``。"
1192
1191
1193
1192
#: ../../library/asyncio-eventloop.rst:733
1194
1193
msgid ""
@@ -1255,8 +1254,9 @@ msgid ""
1255
1254
"argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, "
1256
1255
"and :class:`~pathlib.Path` paths are supported."
1257
1256
msgstr ""
1258
- "*path* 是 Unix 域 socket 的名稱,除非提供了 *sock* 引數,否則必須給定。支援抽象 "
1259
- "Unix sockets、:class:`str`、:class:`bytes` 和 :class:`~pathlib.Path` 路徑。"
1257
+ "*path* 是 Unix 域 socket 的名稱,除非提供了 *sock* 引數,否則必須給定。支援抽"
1258
+ "象 Unix sockets、:class:`str`、:class:`bytes` 和 :class:`~pathlib.Path` 路"
1259
+ "徑。"
1260
1260
1261
1261
#: ../../library/asyncio-eventloop.rst:791
1262
1262
msgid ""
@@ -1455,7 +1455,8 @@ msgid ""
1455
1455
"Use :func:`functools.partial` :ref:`to pass keyword arguments <asyncio-pass-"
1456
1456
"keywords>` to *callback*."
1457
1457
msgstr ""
1458
- "使用 :func:`functools.partial` 向 *callback* :ref:`傳送關鍵字引數 <asyncio-pass-keywords>`。"
1458
+ "使用 :func:`functools.partial` 向 *callback* :ref:`傳送關鍵字引數 <asyncio-"
1459
+ "pass-keywords>`。"
1459
1460
1460
1461
#: ../../library/asyncio-eventloop.rst:960
1461
1462
msgid ""
@@ -1470,8 +1471,8 @@ msgid ""
1470
1471
"See also :ref:`Platform Support <asyncio-platform-support>` section for some "
1471
1472
"limitations of these methods."
1472
1473
msgstr ""
1473
- "另請參閱\\ :ref:`平台支援 <asyncio-platform-support>`\\ 部分以了解這些方法的一些 "
1474
- "限制 。"
1474
+ "另請參閱\\ :ref:`平台支援 <asyncio-platform-support>`\\ 部分以了解這些方法的 "
1475
+ "一些限制 。"
1475
1476
1476
1477
#: ../../library/asyncio-eventloop.rst:968
1477
1478
msgid "Working with socket objects directly"
@@ -1486,8 +1487,8 @@ msgid ""
1486
1487
"socket` objects directly is more convenient."
1487
1488
msgstr ""
1488
1489
"一般情況下,使用基於傳輸的 API(如 :meth:`loop.create_connection` 和 :meth:"
1489
- "`loop.create_server`\\ )的協議實作比直接使用 socket 的實作更快。然而在某些 "
1490
- "情況下性能不是關鍵 ,直接使用 :class:`~socket.socket` 物件更方便。"
1490
+ "`loop.create_server`\\ )的協議實作比直接使用 socket 的實作更快。然而在某些情 "
1491
+ "況下性能不是關鍵 ,直接使用 :class:`~socket.socket` 物件更方便。"
1491
1492
1492
1493
#: ../../library/asyncio-eventloop.rst:979
1493
1494
msgid ""
@@ -1644,8 +1645,8 @@ msgid ""
1644
1645
"the address bound to the socket on the other end of the connection."
1645
1646
msgstr ""
1646
1647
"Socket 必須繫結到一個地址並偵聽連線。回傳值是一個 ``(conn, address)`` 對,其"
1647
- "中 *conn* 是一個 *新* socket 物件,可在連線上發送和接收資料,*address* 是連 "
1648
- "接另一端對應的 socket 地址。"
1648
+ "中 *conn* 是一個 *新* socket 物件,可在連線上發送和接收資料,*address* 是連接 "
1649
+ "另一端對應的 socket 地址。"
1649
1650
1650
1651
#: ../../library/asyncio-eventloop.rst:1096
1651
1652
msgid ":meth:`loop.create_server` and :func:`start_server`."
@@ -1764,8 +1765,8 @@ msgid ""
1764
1765
":class:`SelectorEventLoop` does not support the above methods on Windows. "
1765
1766
"Use :class:`ProactorEventLoop` instead for Windows."
1766
1767
msgstr ""
1767
- ":class:`SelectorEventLoop` 在 Windows 上不支援上述方法。對於 Windows 請使 "
1768
- "用 : class:`ProactorEventLoop`。"
1768
+ ":class:`SelectorEventLoop` 在 Windows 上不支援上述方法。對於 Windows 請使用 : "
1769
+ "class:`ProactorEventLoop`。"
1769
1770
1770
1771
#: ../../library/asyncio-eventloop.rst:1191
1771
1772
msgid ""
@@ -1857,8 +1858,8 @@ msgid ""
1857
1858
"Use :func:`functools.partial` :ref:`to pass keyword arguments <asyncio-pass-"
1858
1859
"keywords>` to *func*."
1859
1860
msgstr ""
1860
- "使用 :func:`functools.partial` 將來\\ :ref:`關鍵字引數傳遞 <asyncio-pass-keywords>` \\ "
1861
- "給 *func*。"
1861
+ "使用 :func:`functools.partial` 將來\\ :ref:`關鍵字引數傳遞 <asyncio-pass-"
1862
+ "keywords>` \\ 給 *func*。"
1862
1863
1863
1864
#: ../../library/asyncio-eventloop.rst:1294
1864
1865
msgid ""
@@ -1909,8 +1910,8 @@ msgid ""
1909
1910
msgstr ""
1910
1911
"如果 *handler* 是 ``None``,則將設置預設例外處理程式。否則,*handler* 必須是"
1911
1912
"一個可呼叫物件,簽名匹配 ``(loop, context)``,其中 ``loop`` 是參照活躍事件迴"
1912
- "圈的,``context`` 是包含例外詳細資訊的 ``dict`` 物件(有關情境的詳細資 "
1913
- "訊,請參閱 :meth:`call_exception_handler` 文件)。"
1913
+ "圈的,``context`` 是包含例外詳細資訊的 ``dict`` 物件(有關情境的詳細資訊,請 "
1914
+ "參閱 :meth:`call_exception_handler` 文件)。"
1914
1915
1915
1916
#: ../../library/asyncio-eventloop.rst:1329
1916
1917
msgid ""
@@ -2010,10 +2011,10 @@ msgstr "例外。"
2010
2011
#: ../../library/asyncio-eventloop.rst:1376
2011
2012
msgid ""
2012
2013
"This method should not be overloaded in subclassed event loops. For custom "
2013
- "exception handling, use the :meth:`set_exception_handler() ` method."
2014
+ "exception handling, use the :meth:`set_exception_handler` method."
2014
2015
msgstr ""
2015
2016
"此方法不應在子類別事件迴圈中被覆寫。為了自定義例外處理,請使用 :meth:"
2016
- "`set_exception_handler() ` 方法。"
2017
+ "`set_exception_handler` 方法。"
2017
2018
2018
2019
#: ../../library/asyncio-eventloop.rst:1381
2019
2020
msgid "Enabling debug mode"
@@ -2146,8 +2147,8 @@ msgstr "類檔案物件"
2146
2147
#: ../../library/asyncio-eventloop.rst:1461
2147
2148
msgid ""
2148
2149
"an existing file descriptor (a positive integer), for example those created "
2149
- "with :meth:`os.pipe() `"
2150
- msgstr "現有的檔案描述器(正整數),例如用 :meth:`os.pipe() ` 建立的"
2150
+ "with :meth:`os.pipe`"
2151
+ msgstr "現有的檔案描述器(正整數),例如用 :meth:`os.pipe` 建立的"
2151
2152
2152
2153
#: ../../library/asyncio-eventloop.rst:1462
2153
2154
#: ../../library/asyncio-eventloop.rst:1472
@@ -2215,8 +2216,8 @@ msgid ""
2215
2216
"`~loop.connect_write_pipe` or :meth:`~loop.connect_read_pipe` for use with "
2216
2217
"the event loop."
2217
2218
msgstr ""
2218
- "如果傳遞給 *stdin*、*stdout* 或 *stderr* 的類檔案物件表示管道,則該管道的 "
2219
- "另一端應該使用 :meth:`~loop.connect_write_pipe` 或 :meth:`~loop."
2219
+ "如果傳遞給 *stdin*、*stdout* 或 *stderr* 的類檔案物件表示管道,則該管道的另一 "
2220
+ "端應該使用 :meth:`~loop.connect_write_pipe` 或 :meth:`~loop."
2220
2221
"connect_read_pipe` 註冊到事件迴圈中。"
2221
2222
2222
2223
#: ../../library/asyncio-eventloop.rst:1505
@@ -2537,9 +2538,9 @@ msgid ""
2537
2538
"call_soon`. Modern asyncio applications rarely need to be written this way; "
2538
2539
"consider using the high-level functions like :func:`asyncio.run`."
2539
2540
msgstr ""
2540
- "請注意,本節中的所有範例都 **故意** 展示如何使用低階事件迴圈 API,如 :"
2541
- "meth: `loop.run_forever` 和 :meth:`loop.call_soon`。現代 asyncio 應用程式很少 "
2542
- "需要這種方式撰寫 ;請考慮使用高階的函式,如 :func:`asyncio.run`。"
2541
+ "請注意,本節中的所有範例都 **故意** 展示如何使用低階事件迴圈 API,如 :meth: "
2542
+ "`loop.run_forever` 和 :meth:`loop.call_soon`。現代 asyncio 應用程式很少需要這 "
2543
+ "種方式撰寫 ;請考慮使用高階的函式,如 :func:`asyncio.run`。"
2543
2544
2544
2545
#: ../../library/asyncio-eventloop.rst:1767
2545
2546
msgid "Hello World with call_soon()"
0 commit comments