88# ww song <[email protected] >, 201899# Yinuo Huang <[email protected] >, 2018101011- # Freesand Leo <[email protected] >, 201912- # Meng Du <[email protected] >, 20191311# Pan Felix <[email protected] >, 201912+ # Freesand Leo <[email protected] >, 20191413#
1514#, fuzzy
1615msgid ""
@@ -19,7 +18,7 @@ msgstr ""
1918"Report-Msgid-Bugs-To : \n "
2019"POT-Creation-Date : 2019-01-01 10:14+0900\n "
2120"PO-Revision-Date : 2017-02-16 17:48+0000\n "
22- "Last-Translator : Pan Felix <tinylambda@gmail .com>, 2019\n "
21+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2019\n "
2322"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2423"MIME-Version : 1.0\n "
2524"Content-Type : text/plain; charset=UTF-8\n "
@@ -50,69 +49,77 @@ msgid ""
5049"authors of lower-level code, libraries, and frameworks, who need finer "
5150"control over the event loop behavior."
5251msgstr ""
52+ "应用开发者通常应当使用高层级的 asyncio 函数,例如 :func:`asyncio.run`,应当很少有必要引用循环对象或调用其方法。 "
53+ "本节所针对的主要是低层级代码、库和框架的编写者,他们需要更细致地控制事件循环行为。"
5354
5455#: ../../library/asyncio-eventloop.rst:22
5556msgid "Obtaining the Event Loop"
56- msgstr ""
57+ msgstr "获取事件循环 "
5758
5859#: ../../library/asyncio-eventloop.rst:23
5960msgid ""
6061"The following low-level functions can be used to get, set, or create an "
6162"event loop:"
62- msgstr ""
63+ msgstr "以下低层级函数可被用于获取、设置或创建事件循环: "
6364
6465#: ../../library/asyncio-eventloop.rst:28
6566msgid "Return the running event loop in the current OS thread."
66- msgstr ""
67+ msgstr "返回当前 OS 线程中正在运行的事件循环。 "
6768
6869#: ../../library/asyncio-eventloop.rst:30
6970msgid ""
7071"If there is no running event loop a :exc:`RuntimeError` is raised. This "
7172"function can only be called from a coroutine or a callback."
72- msgstr ""
73+ msgstr "如果没有正在运行的事件循环则会引发 :exc:`RuntimeError`。 此函数只能由协程或回调来调用。 "
7374
7475#: ../../library/asyncio-eventloop.rst:37
7576msgid ""
7677"Get the current event loop. If there is no current event loop set in the "
7778"current OS thread and :func:`set_event_loop` has not yet been called, "
7879"asyncio will create a new event loop and set it as the current one."
7980msgstr ""
81+ "获取当前事件循环。 如果当前 OS 线程没有设置当前事件循环并且 :func:`set_event_loop` 还没有被调用,asyncio "
82+ "将创建一个新的事件循环并将其设置为当前循环。"
8083
8184#: ../../library/asyncio-eventloop.rst:42
8285msgid ""
8386"Because this function has rather complex behavior (especially when custom "
8487"event loop policies are in use), using the :func:`get_running_loop` function"
8588" is preferred to :func:`get_event_loop` in coroutines and callbacks."
8689msgstr ""
90+ "由于此函数具有相当复杂的行为(特别是在使用了自定义事件循环策略的时候),更推荐在协程和回调中使用 :func:`get_running_loop` "
91+ "函数而非 :func:`get_event_loop`。"
8792
8893#: ../../library/asyncio-eventloop.rst:47
8994msgid ""
9095"Consider also using the :func:`asyncio.run` function instead of using lower "
9196"level functions to manually create and close an event loop."
92- msgstr ""
97+ msgstr "应该考虑使用 :func:`asyncio.run` 函数而非使用低层级函数来手动创建和关闭事件循环。 "
9398
9499#: ../../library/asyncio-eventloop.rst:52
95100msgid "Set *loop* as a current event loop for the current OS thread."
96- msgstr ""
101+ msgstr "将 *loop* 设置为当前 OS 线程的当前事件循环。 "
97102
98103#: ../../library/asyncio-eventloop.rst:56
99104msgid "Create a new event loop object."
100- msgstr ""
105+ msgstr "创建一个新的事件循环。 "
101106
102107#: ../../library/asyncio-eventloop.rst:58
103108msgid ""
104109"Note that the behaviour of :func:`get_event_loop`, :func:`set_event_loop`, "
105110"and :func:`new_event_loop` functions can be altered by :ref:`setting a "
106111"custom event loop policy <asyncio-policies>`."
107112msgstr ""
113+ "请注意 :func:`get_event_loop`, :func:`set_event_loop` 以及 :func:`new_event_loop`"
114+ " 函数的行为可以通过 :ref:`设置自定义事件循环策略 <asyncio-policies>` 来改变。"
108115
109116#: ../../library/asyncio-eventloop.rst:64
110117msgid "Contents"
111118msgstr "内容"
112119
113120#: ../../library/asyncio-eventloop.rst:65
114121msgid "This documentation page contains the following sections:"
115- msgstr ""
122+ msgstr "本文档包含下列小节: "
116123
117124#: ../../library/asyncio-eventloop.rst:67
118125msgid ""
@@ -674,9 +681,9 @@ msgid ""
674681"specified, *local_addr* and *remote_addr* should be omitted (must be "
675682":const:`None`)."
676683msgstr ""
677- "*sock* 可选择通过指定此值用于使用一个预先存在的,已经处于连接状态的 "
678- ":class:`socket.socket` 对象,并将其提供给此传输对象使用。如果指定了这个值, *local_addr* 和 "
679- "*remote_addr* 就应该被忽略(必须为 :const:`None`) 。"
684+ "*sock* 可选择通过指定此值用于使用一个预先存在的,已经处于连接状态的 :class:`socket.socket` "
685+ "对象,并将其提供给此传输对象使用。如果指定了这个值, *local_addr* 和 *remote_addr* 就应该被忽略 (必须为 "
686+ ":const:`None`) 。"
680687
681688#: ../../library/asyncio-eventloop.rst:479
682689msgid ""
@@ -688,8 +695,8 @@ msgid ""
688695"See :ref:`UDP echo client protocol <asyncio-udp-echo-client-protocol>` and "
689696":ref:`UDP echo server protocol <asyncio-udp-echo-server-protocol>` examples."
690697msgstr ""
691- "参见 :ref:`UDP echo客户端协议 <asyncio-udp-echo-client-protocol>` 和 :ref:`UDP "
692- "echo服务端协议 <asyncio-udp-echo-server-protocol>` 的例子。"
698+ "参见 :ref:`UDP echo 客户端协议 <asyncio-udp-echo-client-protocol>` 和 :ref:`UDP "
699+ "echo 服务端协议 <asyncio-udp-echo-server-protocol>` 的例子。"
693700
694701#: ../../library/asyncio-eventloop.rst:484
695702msgid ""
@@ -726,7 +733,7 @@ msgstr ""
726733#: ../../library/asyncio-eventloop.rst:628
727734#: ../../library/asyncio-eventloop.rst:984
728735msgid ":ref:`Availability <availability>`: Unix."
729- msgstr ":ref:`Availability <availability>`: Unix. "
736+ msgstr ":ref:`可用性 <availability>`: Unix。 "
730737
731738#: ../../library/asyncio-eventloop.rst:515
732739msgid "The *path* parameter can now be a :term:`path-like object`."
@@ -785,7 +792,7 @@ msgstr ""
785792
786793#: ../../library/asyncio-eventloop.rst:557
787794msgid "*flags* is a bitmask for :meth:`getaddrinfo`."
788- msgstr "*flags* 是用于 :met :`getaddrinfo` 的位掩码。"
795+ msgstr "*flags* 是用于 :meth :`getaddrinfo` 的位掩码。"
789796
790797#: ../../library/asyncio-eventloop.rst:559
791798msgid ""
@@ -811,8 +818,8 @@ msgid ""
811818" port as other existing endpoints are bound to, so long as they all set this"
812819" flag when being created. This option is not supported on Windows."
813820msgstr ""
814- "*reuse_port* "
815- "告知内核,只要在创建的时候都设置了这个标志,就允许此端点绑定到其它端点列表所绑定的同样的端口上。这个选项在Windows上是不支持的 。"
821+ "*reuse_port* 告知内核,只要在创建的时候都设置了这个标志,就允许此端点绑定到其它端点列表所绑定的同样的端口上。这个选项在 Windows "
822+ "上是不支持的 。"
816823
817824#: ../../library/asyncio-eventloop.rst:578
818825msgid ""
@@ -896,7 +903,7 @@ msgstr ""
896903msgid ""
897904"*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the "
898905"accepted connections."
899- msgstr "*ssl* 可被设置为一个 :class:`~ssl.SSLContext` 以在接受的连接上启用SSL 。"
906+ msgstr "*ssl* 可被设置为一个 :class:`~ssl.SSLContext` 以在接受的连接上启用 SSL 。"
900907
901908#: ../../library/asyncio-eventloop.rst:656
902909msgid ""
0 commit comments