88# walkinrain <[email protected] >, 2019991010# Freesand Leo <[email protected] >, 202011+ 1112#
1213#, fuzzy
1314msgid ""
1415msgstr ""
1516"Project-Id-Version : Python 3.9\n "
1617"Report-Msgid-Bugs-To : \n "
17- "POT-Creation-Date : 2020-08-20 03:54 +0000\n "
18+ "POT-Creation-Date : 2020-08-23 03:56 +0000\n "
1819"PO-Revision-Date : 2017-02-16 23:03+0000\n "
19- "
Last-Translator :
Freesand Leo <[email protected] >, 2020\n"
20+ "
Last-Translator :
Hissy <[email protected] >, 2020\n"
2021"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2122"MIME-Version : 1.0\n "
2223"Content-Type : text/plain; charset=UTF-8\n "
@@ -333,19 +334,27 @@ msgstr "``asend``, ``athrow``"
333334msgid "``aclose``, ``__aiter__``, ``__anext__``"
334335msgstr "``aclose``, ``__aiter__``, ``__anext__``"
335336
336- #: ../../library/collections.abc.rst:105
337- msgid ""
338- "ABCs for classes that provide respectively the methods :meth:`__contains__`, "
339- " :meth:`__hash__`, :meth:`__len__`, and :meth:`__call__`."
340- msgstr ""
341- "分别提供了 :meth:`__contains__`, :meth:`__hash__`, :meth:`__len__` 和 "
342- " :meth:`__call__ ` 方法的抽象基类。"
337+ #: ../../library/collections.abc.rst:102
338+ msgid "ABC for classes that provide the :meth:`__contains__` method. "
339+ msgstr "提供了 :meth:`__contains__` 方法的抽象基类。 "
340+
341+ #: ../../library/collections.abc.rst:106
342+ msgid "ABC for classes that provide the :meth:`__hash__` method. "
343+ msgstr "提供了 :meth:`__hash__ ` 方法的抽象基类。"
343344
344345#: ../../library/collections.abc.rst:110
346+ msgid "ABC for classes that provide the :meth:`__len__` method."
347+ msgstr "提供了 :meth:`__len__` 方法的抽象基类。"
348+
349+ #: ../../library/collections.abc.rst:114
350+ msgid "ABC for classes that provide the :meth:`__call__` method."
351+ msgstr "提供了 :meth:`__call__` 方法的抽象基类。"
352+
353+ #: ../../library/collections.abc.rst:118
345354msgid "ABC for classes that provide the :meth:`__iter__` method."
346355msgstr "提供了 :meth:`__iter__` 方法的抽象基类。"
347356
348- #: ../../library/collections.abc.rst:112
357+ #: ../../library/collections.abc.rst:120
349358msgid ""
350359"Checking ``isinstance(obj, Iterable)`` detects classes that are registered "
351360"as :class:`Iterable` or that have an :meth:`__iter__` method, but it does "
@@ -357,11 +366,11 @@ msgstr ""
357366":meth:`__iter__` 函数,但是无法检测这个类是否能够使用 :meth:`__getitem__` 方法进行迭代。检测一个对象是否是 "
358367":term:`iterable` 的唯一可信赖的方法是调用 ``iter(obj)``。"
359368
360- #: ../../library/collections.abc.rst:120
369+ #: ../../library/collections.abc.rst:128
361370msgid "ABC for sized iterable container classes."
362371msgstr "集合了 Sized 和 Iterable 类的抽象基类。"
363372
364- #: ../../library/collections.abc.rst:126
373+ #: ../../library/collections.abc.rst:134
365374msgid ""
366375"ABC for classes that provide the :meth:`~iterator.__iter__` and "
367376":meth:`~iterator.__next__` methods. See also the definition of "
@@ -370,12 +379,12 @@ msgstr ""
370379"提供了 :meth:`~iterator.__iter__` 和 :meth:`~iterator.__next__` 方法的抽象基类。参见 "
371380":term:`iterator` 的定义。"
372381
373- #: ../../library/collections.abc.rst:132
382+ #: ../../library/collections.abc.rst:140
374383msgid ""
375384"ABC for iterable classes that also provide the :meth:`__reversed__` method."
376385msgstr "为可迭代类提供了 :meth:`__reversed__` 方法的抽象基类。"
377386
378- #: ../../library/collections.abc.rst:139
387+ #: ../../library/collections.abc.rst:147
379388msgid ""
380389"ABC for generator classes that implement the protocol defined in :pep:`342` "
381390"that extends iterators with the :meth:`~generator.send`, "
@@ -386,11 +395,11 @@ msgstr ""
386395":meth:`~generator.throw` 和 :meth:`~generator.close` 方法。参见 :term:`generator` "
387396"的定义。"
388397
389- #: ../../library/collections.abc.rst:150
398+ #: ../../library/collections.abc.rst:158
390399msgid "ABCs for read-only and mutable :term:`sequences <sequence>`."
391400msgstr "只读且可变的序列 :term:`sequences <sequence>` 的抽象基类。"
392401
393- #: ../../library/collections.abc.rst:152
402+ #: ../../library/collections.abc.rst:160
394403msgid ""
395404"Implementation note: Some of the mixin methods, such as :meth:`__iter__`, "
396405":meth:`__reversed__` and :meth:`index`, make repeated calls to the "
@@ -404,24 +413,24 @@ msgstr ""
404413"会重复调用底层的 :meth:`__getitem__` 方法。因此,如果实现的 :meth:`__getitem__` "
405414"是常数级访问速度,那么相应的混入方法会有一个线性的表现;然而,如果底层方法是线性实现(例如链表),那么混入方法将会是平方级的表现,这也许就需要被重构了。"
406415
407- #: ../../library/collections.abc.rst:161
416+ #: ../../library/collections.abc.rst:169
408417msgid "The index() method added support for *stop* and *start* arguments."
409418msgstr "index() 方法支持 *stop* 和 *start* 参数。"
410419
411- #: ../../library/collections.abc.rst:168
420+ #: ../../library/collections.abc.rst:176
412421msgid "ABCs for read-only and mutable sets."
413422msgstr "只读且可变的集合的抽象基类。"
414423
415- #: ../../library/collections.abc.rst:173
424+ #: ../../library/collections.abc.rst:181
416425msgid "ABCs for read-only and mutable :term:`mappings <mapping>`."
417426msgstr "只读且可变的映射 :term:`mappings <mapping>` 的抽象基类。"
418427
419- #: ../../library/collections.abc.rst:180
428+ #: ../../library/collections.abc.rst:188
420429msgid ""
421430"ABCs for mapping, items, keys, and values :term:`views <dictionary view>`."
422431msgstr "映射及其键和值的视图 :term:`views <dictionary view>` 的抽象基类。"
423432
424- #: ../../library/collections.abc.rst:184
433+ #: ../../library/collections.abc.rst:192
425434msgid ""
426435"ABC for :term:`awaitable` objects, which can be used in :keyword:`await` "
427436"expressions. Custom implementations must provide the :meth:`__await__` "
@@ -430,15 +439,15 @@ msgstr ""
430439"为可等待对象 :term:`awaitable` 提供的类,可以被用于 :keyword:`await` 表达式中。习惯上必须实现 "
431440":meth:`__await__` 方法。"
432441
433- #: ../../library/collections.abc.rst:188
442+ #: ../../library/collections.abc.rst:196
434443msgid ""
435444":term:`Coroutine <coroutine>` objects and instances of the "
436445":class:`~collections.abc.Coroutine` ABC are all instances of this ABC."
437446msgstr ""
438447":term:`协程 <coroutine>` 对象和 :class:`~collections.abc.Coroutine` ABC 的实例都是这个 "
439448"ABC 的实例。"
440449
441- #: ../../library/collections.abc.rst:192
450+ #: ../../library/collections.abc.rst:200
442451msgid ""
443452"In CPython, generator-based coroutines (generators decorated with "
444453":func:`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even"
@@ -450,7 +459,7 @@ msgstr ""
450459"包装的生成器)都是 *可等待对象*,即使他们不含有 :meth:`__await__` 方法。使用 ``isinstance(gencoro, "
451460"Awaitable)`` 来检测他们会返回 ``False``。要使用 :func:`inspect.isawaitable` 来检测他们。"
452461
453- #: ../../library/collections.abc.rst:202
462+ #: ../../library/collections.abc.rst:210
454463msgid ""
455464"ABC for coroutine compatible classes. These implement the following "
456465"methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, "
@@ -464,7 +473,7 @@ msgstr ""
464473":meth:`~coroutine.close`。通常的实现里还需要实现 :meth:`__await__` 方法。所有的 "
465474":class:`Coroutine` 实例都必须是 :class:`Awaitable` 实例。参见 :term:`coroutine` 的定义。"
466475
467- #: ../../library/collections.abc.rst:210
476+ #: ../../library/collections.abc.rst:218
468477msgid ""
469478"In CPython, generator-based coroutines (generators decorated with "
470479":func:`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even"
@@ -476,33 +485,33 @@ msgstr ""
476485"包装的生成器)都是 *可等待对象*,即使他们不含有 :meth:`__await__` 方法。使用 ``isinstance(gencoro, "
477486"Coroutine)`` 来检测他们会返回 ``False``。要使用 :func:`inspect.isawaitable` 来检测他们。"
478487
479- #: ../../library/collections.abc.rst:220
488+ #: ../../library/collections.abc.rst:228
480489msgid ""
481490"ABC for classes that provide ``__aiter__`` method. See also the definition "
482491"of :term:`asynchronous iterable`."
483492msgstr "提供了 ``__aiter__`` 方法的抽象基类。参见 :term:`asynchronous iterable` 的定义。"
484493
485- #: ../../library/collections.abc.rst:227
494+ #: ../../library/collections.abc.rst:235
486495msgid ""
487496"ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See "
488497"also the definition of :term:`asynchronous iterator`."
489498msgstr ""
490499"提供了 ``__aiter__`` 和 ``__anext__`` 方法的抽象基类。参见 :term:`asynchronous iterator` "
491500"的定义。"
492501
493- #: ../../library/collections.abc.rst:234
502+ #: ../../library/collections.abc.rst:242
494503msgid ""
495504"ABC for asynchronous generator classes that implement the protocol defined "
496505"in :pep:`525` and :pep:`492`."
497506msgstr "为异步生成器类提供的抽象基类,这些类实现了定义在 :pep:`525` 和 :pep:`492` 里的协议。"
498507
499- #: ../../library/collections.abc.rst:240
508+ #: ../../library/collections.abc.rst:248
500509msgid ""
501510"These ABCs allow us to ask classes or instances if they provide particular "
502511"functionality, for example::"
503512msgstr "这些抽象基类让我们可以确定类和示例拥有某些特定的函数,例如:"
504513
505- #: ../../library/collections.abc.rst:247
514+ #: ../../library/collections.abc.rst:255
506515msgid ""
507516"Several of the ABCs are also useful as mixins that make it easier to develop"
508517" classes supporting container APIs. For example, to write a class "
@@ -515,11 +524,11 @@ msgstr ""
515524"的类,只需要提供下面这三个方法: :meth:`__contains__`, :meth:`__iter__` 和 "
516525":meth:`__len__`。抽象基类会补充上其余的方法,比如 :meth:`__and__` 和 :meth:`isdisjoint`::"
517526
518- #: ../../library/collections.abc.rst:276
527+ #: ../../library/collections.abc.rst:284
519528msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:"
520529msgstr "当把 :class:`Set` 和 :class:`MutableSet` 用作混入类时需注意:"
521530
522- #: ../../library/collections.abc.rst:279
531+ #: ../../library/collections.abc.rst:287
523532msgid ""
524533"Since some set operations create new sets, the default mixin methods need a "
525534"way to create new instances from an iterable. The class constructor is "
@@ -536,7 +545,7 @@ msgstr ""
536545"混入类在类中被使用,但其构造函数的签名却是不同的形式,那么你就需要重载 :meth:`_from_iterable` "
537546"方法,将其编写成一个类方法,并且它能够从可迭代对象参数中构造一个新实例。"
538547
539- #: ../../library/collections.abc.rst:290
548+ #: ../../library/collections.abc.rst:298
540549msgid ""
541550"To override the comparisons (presumably for speed, as the semantics are "
542551"fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other "
@@ -545,7 +554,7 @@ msgstr ""
545554"重载比较符时时(想必是为了速度,因为其语义都是固定的),只需要重定义 :meth:`__le__` 和 :meth:`__ge__` "
546555"函数,然后其他的操作会自动跟进。"
547556
548- #: ../../library/collections.abc.rst:295
557+ #: ../../library/collections.abc.rst:303
549558msgid ""
550559"The :class:`Set` mixin provides a :meth:`_hash` method to compute a hash "
551560"value for the set; however, :meth:`__hash__` is not defined because not all "
@@ -557,14 +566,14 @@ msgstr ""
557566"函数却没有被定义,因为并不是所有集合都是可哈希并且不可变的。为了使用混入类为集合添加哈希能力,可以同时继承 :meth:`Set` 和 "
558567":meth:`Hashable` 类,然后定义 ``__hash__ = Set._hash``。"
559568
560- #: ../../library/collections.abc.rst:303
569+ #: ../../library/collections.abc.rst:311
561570msgid ""
562571"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ for an "
563572"example built on :class:`MutableSet`."
564573msgstr ""
565574"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ 是基于 "
566575":class:`MutableSet` 构建的一个示例。"
567576
568- #: ../../library/collections.abc.rst:306
577+ #: ../../library/collections.abc.rst:314
569578msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`."
570579msgstr "对于抽象基类,参见 :mod:`abc` 模块和 :pep:`3119`。"
0 commit comments