66# Translators:
77# Freesand Leo <[email protected] >, 201988# MuSheng Chen <[email protected] >, 20199+ 910#
1011#, fuzzy
1112msgid ""
@@ -14,7 +15,7 @@ msgstr ""
1415"Report-Msgid-Bugs-To : \n "
1516"POT-Creation-Date : 2019-01-01 10:14+0900\n "
1617"PO-Revision-Date : 2018-09-18 00:23+0000\n "
17- "Last-Translator : MuSheng Chen <sheng.2179 @gmail.com>, 2019\n "
18+ "Last-Translator : 刘玉龙 <banbooliu @gmail.com>, 2019\n "
1819"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1920"MIME-Version : 1.0\n "
2021"Content-Type : text/plain; charset=UTF-8\n "
@@ -24,33 +25,33 @@ msgstr ""
2425
2526#: ../../library/asyncio-future.rst:8
2627msgid "Futures"
27- msgstr "期程 "
28+ msgstr "Futures "
2829
2930#: ../../library/asyncio-future.rst:10
3031msgid ""
3132"*Future* objects are used to bridge **low-level callback-based code** with "
3233"high-level async/await code."
33- msgstr "*期程 * 对象用来链接 **底层回调式代码** 和高层异步/等待式代码。"
34+ msgstr "*Future * 对象用来链接 **底层回调式代码** 和高层异步/等待式代码。"
3435
3536#: ../../library/asyncio-future.rst:15
3637msgid "Future Functions"
37- msgstr "期程函数 "
38+ msgstr "Future 函数 "
3839
3940#: ../../library/asyncio-future.rst:19
4041msgid "Return ``True`` if *obj* is either of:"
4142msgstr "如果 *obj* 为下面任意对象,返回 ``True``:"
4243
4344#: ../../library/asyncio-future.rst:21
4445msgid "an instance of :class:`asyncio.Future`,"
45- msgstr " :class:`asyncio.Future` 实例 ,"
46+ msgstr "一个 :class:`asyncio.Future` 类的实例 ,"
4647
4748#: ../../library/asyncio-future.rst:22
4849msgid "an instance of :class:`asyncio.Task`,"
49- msgstr " :class:`asyncio.Task` 实例 ,"
50+ msgstr "一个 :class:`asyncio.Task` 类的实例 ,"
5051
5152#: ../../library/asyncio-future.rst:23
5253msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute."
53- msgstr "带有 ``_asyncio_future_blocking`` 属性的类似期程的对象 。"
54+ msgstr "带有 ``_asyncio_future_blocking`` 属性的类似 Future 的对象 。"
5455
5556#: ../../library/asyncio-future.rst:31
5657msgid "Return:"
@@ -61,8 +62,8 @@ msgid ""
6162"*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a "
6263"Future-like object (:func:`isfuture` is used for the test.)"
6364msgstr ""
64- "*obj* 参数会是保持原样,如果 *obj* 是 :class:`Future`、 :class:`Task` 或 类似期程的对象 ( "
65- ":func:`isfuture` 用于测试)"
65+ "*obj* 参数会是保持原样,如果 *obj* 是 :class:`Future`、 :class:`Task` 或 类似 Future 的对象 ( "
66+ ":func:`isfuture` 用于测试。 )"
6667
6768#: ../../library/asyncio-future.rst:37
6869msgid ""
@@ -102,28 +103,28 @@ msgstr ""
102103
103104#: ../../library/asyncio-future.rst:61
104105msgid "Future Object"
105- msgstr "期程对象 "
106+ msgstr "Future 对象 "
106107
107108#: ../../library/asyncio-future.rst:65
108109msgid ""
109110"A Future represents an eventual result of an asynchronous operation. Not "
110111"thread-safe."
111- msgstr "一个期程代表一个异步运算的最终结果 。线程不安全。"
112+ msgstr "一个 Future 代表一个异步运算的最终结果 。线程不安全。"
112113
113114#: ../../library/asyncio-future.rst:68
114115msgid ""
115116"Future is an :term:`awaitable` object. Coroutines can await on Future "
116117"objects until they either have a result or an exception set, or until they "
117118"are cancelled."
118- msgstr "期程是一个 :term:`awaitable` 对象。协程可以等待期程对象直到它们有结果或异常集合或被取消 。"
119+ msgstr "Future 是一个 :term:`awaitable` 对象。协程可以等待 Future 对象直到它们有结果或异常集合或被取消 。"
119120
120121#: ../../library/asyncio-future.rst:72
121122msgid ""
122123"Typically Futures are used to enable low-level callback-based code (e.g. in "
123124"protocols implemented using asyncio :ref:`transports <asyncio-transports-"
124125"protocols>`) to interoperate with high-level async/await code."
125126msgstr ""
126- "通常期程用于支持底层回调式代码 (例如在协议实现中使用asyncio :ref:`transports<asyncio-transports-"
127+ "通常 Future 用于支持底层回调式代码 (例如在协议实现中使用asyncio :ref:`transports<asyncio-transports-"
127128"protocols>`) 与高层异步/等待式代码交互。"
128129
129130#: ../../library/asyncio-future.rst:77
@@ -133,89 +134,89 @@ msgid ""
133134":meth:`loop.create_future`. This way alternative event loop implementations"
134135" can inject their own optimized implementations of a Future object."
135136msgstr ""
136- "经验告诉我们永远不要面向用户的接口暴露期程对象 ,同时建议使用 :meth:`loop.create_future` "
137- "来创建期对象。这种方法可以让期程对象使用其它的事件循环实现 ,它可以注入自己的优化实现。"
137+ "经验告诉我们永远不要面向用户的接口暴露 Future 对象 ,同时建议使用 :meth:`loop.create_future` 来创建 Future "
138+ "对象。这种方法可以让 Future 对象使用其它的事件循环实现 ,它可以注入自己的优化实现。"
138139
139140#: ../../library/asyncio-future.rst:83
140141msgid "Added support for the :mod:`contextvars` module."
141142msgstr "加入对 :mod:`contextvars` 模块的支持。"
142143
143144#: ../../library/asyncio-future.rst:88
144145msgid "Return the result of the Future."
145- msgstr "返回期程结果 。"
146+ msgstr "返回 Future 的结果 。"
146147
147148#: ../../library/asyncio-future.rst:90
148149msgid ""
149150"If the Future is *done* and has a result set by the :meth:`set_result` "
150151"method, the result value is returned."
151- msgstr "如果期程状态为 *完成* ,并由 :meth:`set_result` 方法设置一个结果,则返回这个结果。"
152+ msgstr "如果 Future 状态为 *完成* ,并由 :meth:`set_result` 方法设置一个结果,则返回这个结果。"
152153
153154#: ../../library/asyncio-future.rst:93
154155msgid ""
155156"If the Future is *done* and has an exception set by the "
156157":meth:`set_exception` method, this method raises the exception."
157- msgstr "如果期程状态为 *完成* ,并由 :meth:`set_exception` 方法设置一个异常,那么这个方法会引发异常。"
158+ msgstr "如果 Future 状态为 *完成* ,并由 :meth:`set_exception` 方法设置一个异常,那么这个方法会引发异常。"
158159
159160#: ../../library/asyncio-future.rst:96 ../../library/asyncio-future.rst:181
160161msgid ""
161162"If the Future has been *cancelled*, this method raises a "
162163":exc:`CancelledError` exception."
163- msgstr "如果期程已 *取消*,方法会引发一个 :exc:`CancelledError` 异常。"
164+ msgstr "如果 Future 已 *取消*,方法会引发一个 :exc:`CancelledError` 异常。"
164165
165166#: ../../library/asyncio-future.rst:99
166167msgid ""
167168"If the Future's result isn't yet available, this method raises a "
168169":exc:`InvalidStateError` exception."
169- msgstr "如果期程的结果还不可用 ,此方法会引发一个 :exc:`InvalidStateError` 异常。"
170+ msgstr "如果 Future 的结果还不可用 ,此方法会引发一个 :exc:`InvalidStateError` 异常。"
170171
171172#: ../../library/asyncio-future.rst:104
172173msgid "Mark the Future as *done* and set its result."
173- msgstr "将期程标记为 *完成* 并设置结果。"
174+ msgstr "将 Future 标记为 *完成* 并设置结果。"
174175
175176#: ../../library/asyncio-future.rst:106 ../../library/asyncio-future.rst:113
176177msgid ""
177178"Raises a :exc:`InvalidStateError` error if the Future is already *done*."
178- msgstr "如果期程已经 *完成* 则引发一个 :exc:`InvalidStateError` 错误。"
179+ msgstr "如果 Future 已经 *完成* 则抛出一个 :exc:`InvalidStateError` 错误。"
179180
180181#: ../../library/asyncio-future.rst:111
181182msgid "Mark the Future as *done* and set an exception."
182- msgstr "将期程标记为 *完成* 并设置一个异常。"
183+ msgstr "将 Future 标记为 *完成* 并设置一个异常。"
183184
184185#: ../../library/asyncio-future.rst:118
185186msgid "Return ``True`` if the Future is *done*."
186- msgstr "如果期程为已 *完成* 返回 ``True`` 。"
187+ msgstr "如果 Future 为已 *完成* 则返回 ``True`` 。"
187188
188189#: ../../library/asyncio-future.rst:120
189190msgid ""
190191"A Future is *done* if it was *cancelled* or if it has a result or an "
191192"exception set with :meth:`set_result` or :meth:`set_exception` calls."
192193msgstr ""
193- "如果期程为 *取消* 或调用 :meth:`set_result` 设置了结果或调用 :meth:`set_exception` 设置了异常,那么它就是 "
194- " *完成* 。"
194+ "如果 Future 为 *取消* 或调用 :meth:`set_result` 设置了结果或调用 :meth:`set_exception` "
195+ "设置了异常,那么它就是 *完成* 。"
195196
196197#: ../../library/asyncio-future.rst:126
197198msgid "Return ``True`` if the Future was *cancelled*."
198- msgstr "如果期程已 *取消* 返回 ``True`` "
199+ msgstr "如果 Future 已 *取消* 则返回 ``True`` "
199200
200201#: ../../library/asyncio-future.rst:128
201202msgid ""
202203"The method is usually used to check if a Future is not *cancelled* before "
203204"setting a result or an exception for it::"
204- msgstr "这个方法通常在设置结果或异常前用来检查期程是否已 *取消* 。"
205+ msgstr "这个方法通常在设置结果或异常前用来检查 Future 是否已 *取消* 。"
205206
206207#: ../../library/asyncio-future.rst:136
207208msgid "Add a callback to be run when the Future is *done*."
208- msgstr "添加一个在期程 *完成* 时运行的回调函数。"
209+ msgstr "添加一个在 Future *完成* 时运行的回调函数。"
209210
210211#: ../../library/asyncio-future.rst:138
211212msgid "The *callback* is called with the Future object as its only argument."
212- msgstr "调用 *callback* 时,期程对象是它的唯一参数 。"
213+ msgstr "调用 *callback* 时,Future 对象是它的唯一参数 。"
213214
214215#: ../../library/asyncio-future.rst:141
215216msgid ""
216217"If the Future is already *done* when this method is called, the callback is "
217218"scheduled with :meth:`loop.call_soon`."
218- msgstr "调用这个方法时期程已经 *完成* , 回调函数已被 :meth:`loop.call_soon` 调度。"
219+ msgstr "调用这个方法时 Future 已经 *完成* , 回调函数已被 :meth:`loop.call_soon` 调度。"
219220
220221#: ../../library/asyncio-future.rst:144
221222msgid ""
@@ -250,53 +251,54 @@ msgstr "返回被移除的回调函数的数量,通常为1,除非一个回
250251
251252#: ../../library/asyncio-future.rst:168
252253msgid "Cancel the Future and schedule callbacks."
253- msgstr "取消期程并调度回调函数 。"
254+ msgstr "取消 Future 并调度回调函数 。"
254255
255256#: ../../library/asyncio-future.rst:170
256257msgid ""
257258"If the Future is already *done* or *cancelled*, return ``False``. Otherwise,"
258259" change the Future's state to *cancelled*, schedule the callbacks, and "
259260"return ``True``."
260261msgstr ""
261- "如果期程已经 *完成* 或 *取消* ,返回 ``False`` 。否则将期程状态改为 *取消* 并在调度回调函数后返回 ``True`` 。"
262+ "如果 Future 已经 *完成* 或 *取消* ,返回 ``False`` 。否则将 Future 状态改为 *取消* 并在调度回调函数后返回 "
263+ "``True`` 。"
262264
263265#: ../../library/asyncio-future.rst:176
264266msgid "Return the exception that was set on this Future."
265- msgstr "返回期程已设置的异常 。"
267+ msgstr "返回 Future 已设置的异常 。"
266268
267269#: ../../library/asyncio-future.rst:178
268270msgid ""
269271"The exception (or ``None`` if no exception was set) is returned only if the "
270272"Future is *done*."
271- msgstr "只有期程在 *完成* 时才返回异常( 或者 ``None`` ,如果没有设置异常 ) 。"
273+ msgstr "只有 Future 在 *完成* 时才返回异常( 或者 ``None`` ,如果没有设置异常) 。"
272274
273275#: ../../library/asyncio-future.rst:184
274276msgid ""
275277"If the Future isn't *done* yet, this method raises an "
276278":exc:`InvalidStateError` exception."
277- msgstr "如果期程还没 *完成* ,这个方法会引发一个 :exc:`InvalidStateError` 异常。"
279+ msgstr "如果 Future 还没 *完成* ,这个方法会引发一个 :exc:`InvalidStateError` 异常。"
278280
279281#: ../../library/asyncio-future.rst:189
280282msgid "Return the event loop the Future object is bound to."
281- msgstr "返回期程对象已绑定的事件循环 。"
283+ msgstr "返回 Future 对象已绑定的事件循环 。"
282284
283285#: ../../library/asyncio-future.rst:196
284286msgid ""
285287"This example creates a Future object, creates and schedules an asynchronous "
286288"Task to set result for the Future, and waits until the Future has a result::"
287- msgstr "这个例子创建一个期程对象,创建和调度一个异步作业去设置期程结果,然后等待期程的结果 ::"
289+ msgstr "这个例子创建一个 Future 对象,创建和调度一个异步任务去设置 Future 结果,然后等待其结果 ::"
288290
289291#: ../../library/asyncio-future.rst:231
290292msgid ""
291293"The Future object was designed to mimic :class:`concurrent.futures.Future`."
292294" Key differences include:"
293- msgstr "该期程对象是为了模仿 :class:`concurrent.futures.Future` 。主要差异包含:"
295+ msgstr "该 Future 对象是为了模仿 :class:`concurrent.futures.Future` 类 。主要差异包含:"
294296
295297#: ../../library/asyncio-future.rst:234
296298msgid ""
297299"unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot "
298300"be awaited."
299- msgstr ":class:`concurrent.futures.Future` 实例不能像asyncio期程那样等待 。"
301+ msgstr "与 asyncio 的 Future 不同, :class:`concurrent.futures.Future` 实例不是可等待对象 。"
300302
301303#: ../../library/asyncio-future.rst:237
302304msgid ""
@@ -311,8 +313,8 @@ msgid ""
311313":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an "
312314":exc:`InvalidStateError` exception when the Future is not *done*."
313315msgstr ""
314- "期程没有 *完成* 时 :meth:`asyncio.Future.result` 和 :meth:`asyncio.Future.exception` "
315- " 引发 :exc:`InvalidStateError` 引发一个异常 。"
316+ "Future 没有 *完成* 时 :meth:`asyncio.Future.result` 和 "
317+ ":meth:`asyncio.Future.exception` 抛出一个 :exc:`InvalidStateError` 异常 。"
316318
317319#: ../../library/asyncio-future.rst:244
318320msgid ""
@@ -327,5 +329,5 @@ msgid ""
327329"asyncio Future is not compatible with the :func:`concurrent.futures.wait` "
328330"and :func:`concurrent.futures.as_completed` functions."
329331msgstr ""
330- "asyncio期程不能兼容 :func:`concurrent.futures.wait` 和 "
332+ "asyncio Future 不能兼容 :func:`concurrent.futures.wait` 和 "
331333":func:`concurrent.futures.as_completed` 函数。"
0 commit comments