44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Rafael Fontenelle <rffontenelle@gmail.com> , 2025
7+ # python-doc bot , 2025
88#
99#, fuzzy
1010msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.14\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2025-05-09 14:19 +0000\n "
15- "PO-Revision-Date : 2025-07-18 18:48 +0000\n "
16- "Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com> , 2025\n "
14+ "POT-Creation-Date : 2025-09-05 14:17 +0000\n "
15+ "PO-Revision-Date : 2025-08-02 17:33 +0000\n "
16+ "Last-Translator : python-doc bot , 2025\n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1818"MIME-Version : 1.0\n "
1919"Content-Type : text/plain; charset=UTF-8\n "
@@ -634,24 +634,38 @@ msgstr ""
634634":meth:`~object.__getitem__` "
635635"被实现为常数级访问速度,则混入方法的性能将为线性级;但是,如果下层的方法是线性的(例如链表就是如此),则混入方法的性能将为平方级并可能需要被重写。"
636636
637- #: ../../library/collections.abc.rst:275
638- msgid "The index() method added support for *stop* and *start* arguments."
639- msgstr "index() 方法支持 *stop* 和 *start* 参数。"
637+ #: ../../library/collections.abc.rst:277
638+ msgid "Return first index of *value*."
639+ msgstr ""
640+
641+ #: ../../library/collections.abc.rst:279
642+ msgid "Raises :exc:`ValueError` if the value is not present."
643+ msgstr ""
644+
645+ #: ../../library/collections.abc.rst:281
646+ msgid ""
647+ "Supporting the *start* and *stop* arguments is optional, but recommended."
648+ msgstr ""
640649
641- #: ../../library/collections.abc.rst:282
650+ #: ../../library/collections.abc.rst:283
651+ msgid ""
652+ "The :meth:`!index` method added support for *stop* and *start* arguments."
653+ msgstr ""
654+
655+ #: ../../library/collections.abc.rst:290
642656msgid "ABCs for read-only and mutable :ref:`sets <types-set>`."
643657msgstr "用于只读和可变 :ref:`集合 <types-set>` 的 ABC。"
644658
645- #: ../../library/collections.abc.rst:287
659+ #: ../../library/collections.abc.rst:295
646660msgid "ABCs for read-only and mutable :term:`mappings <mapping>`."
647661msgstr "只读的与可变的 :term:`映射 <mapping>` 的抽象基类。"
648662
649- #: ../../library/collections.abc.rst:294
663+ #: ../../library/collections.abc.rst:302
650664msgid ""
651665"ABCs for mapping, items, keys, and values :term:`views <dictionary view>`."
652666msgstr "映射及其键和值的 :term:`视图 <dictionary view>` 的抽象基类。"
653667
654- #: ../../library/collections.abc.rst:298
668+ #: ../../library/collections.abc.rst:306
655669msgid ""
656670"ABC for :term:`awaitable` objects, which can be used in :keyword:`await` "
657671"expressions. Custom implementations must provide the "
@@ -660,15 +674,15 @@ msgstr ""
660674"针对 :term:`awaitable` 对象的 ABC,它可被用于 :keyword:`await` 表达式。 根据惯例所有实现都必须提供 "
661675":meth:`~object.__await__` 方法。"
662676
663- #: ../../library/collections.abc.rst:302
677+ #: ../../library/collections.abc.rst:310
664678msgid ""
665679":term:`Coroutine <coroutine>` objects and instances of the "
666680":class:`~collections.abc.Coroutine` ABC are all instances of this ABC."
667681msgstr ""
668682":term:`协程 <coroutine>` 对象和 :class:`~collections.abc.Coroutine` ABC 的实例都是这个 "
669683"ABC 的实例。"
670684
671- #: ../../library/collections.abc.rst:306
685+ #: ../../library/collections.abc.rst:314
672686msgid ""
673687"In CPython, generator-based coroutines (:term:`generators <generator>` "
674688"decorated with :func:`@types.coroutine <types.coroutine>`) are *awaitables*,"
@@ -681,7 +695,7 @@ msgstr ""
681695"对它们使用 ``isinstance(gencoro, Awaitable)`` 将返回 ``False``。 请使用 "
682696":func:`inspect.isawaitable` 来检测它们。"
683697
684- #: ../../library/collections.abc.rst:316
698+ #: ../../library/collections.abc.rst:324
685699msgid ""
686700"ABC for :term:`coroutine` compatible classes. These implement the following"
687701" methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, "
@@ -694,7 +708,7 @@ msgstr ""
694708":meth:`~coroutine.close`。 根据惯例所有实现都还需要实现 :meth:`~object.__await__`。 所有的 "
695709":class:`Coroutine` 实例同时也是 :class:`Awaitable` 的实例。"
696710
697- #: ../../library/collections.abc.rst:324
711+ #: ../../library/collections.abc.rst:332
698712msgid ""
699713"In CPython, generator-based coroutines (:term:`generators <generator>` "
700714"decorated with :func:`@types.coroutine <types.coroutine>`) are *awaitables*,"
@@ -707,7 +721,7 @@ msgstr ""
707721"对它们使用 ``isinstance(gencoro, Coroutine)`` 将返回 ``False``。 请使用 "
708722":func:`inspect.isawaitable` 来检测它们。"
709723
710- #: ../../library/collections.abc.rst:330
724+ #: ../../library/collections.abc.rst:338
711725msgid ""
712726"See :ref:`annotating-generators-and-coroutines` for details on using "
713727":class:`!Coroutine` in type annotations. The variance and order of type "
@@ -716,56 +730,56 @@ msgstr ""
716730"有关在类型标注中使用 :class:`!Coroutine` 的详细信息请参阅 :ref:`annotating-generators-and-"
717731"coroutines`。 类型形参的变化和顺序与 :class:`Generator` 的相对应。"
718732
719- #: ../../library/collections.abc.rst:339
733+ #: ../../library/collections.abc.rst:347
720734msgid ""
721735"ABC for classes that provide an ``__aiter__`` method. See also the "
722736"definition of :term:`asynchronous iterable`."
723737msgstr ""
724738"针对提供了 ``__aiter__`` 方法的类的 ABC。 另请参阅 :term:`asynchronous iterable` 的定义。"
725739
726- #: ../../library/collections.abc.rst:346
740+ #: ../../library/collections.abc.rst:354
727741msgid ""
728742"ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See "
729743"also the definition of :term:`asynchronous iterator`."
730744msgstr ""
731745"提供了 ``__aiter__`` 和 ``__anext__`` 方法的抽象基类。参见 :term:`asynchronous iterator` "
732746"的定义。"
733747
734- #: ../../library/collections.abc.rst:353
748+ #: ../../library/collections.abc.rst:361
735749msgid ""
736750"ABC for :term:`asynchronous generator` classes that implement the protocol "
737751"defined in :pep:`525` and :pep:`492`."
738752msgstr ""
739753"针对实现了在 :pep:`525` 和 :pep:`492` 中定义的协议的 :term:`asynchronous generator` 类的 "
740754"ABC。"
741755
742- #: ../../library/collections.abc.rst:356
756+ #: ../../library/collections.abc.rst:364
743757msgid ""
744758"See :ref:`annotating-generators-and-coroutines` for details on using "
745759":class:`!AsyncGenerator` in type annotations."
746760msgstr ""
747761"有关在类型标注中使用 :class:`!AsyncGenerator` 的详细信息请参阅 :ref:`annotating-generators-"
748762"and-coroutines`。"
749763
750- #: ../../library/collections.abc.rst:363
764+ #: ../../library/collections.abc.rst:371
751765msgid ""
752766"ABC for classes that provide the :meth:`~object.__buffer__` method, "
753767"implementing the :ref:`buffer protocol <bufferobjects>`. See :pep:`688`."
754768msgstr ""
755769"针对提供 :meth:`~object.__buffer__` 方法的类的 ABC,实现了 :ref:`缓冲区协议 <bufferobjects>`。 "
756770"参见 :pep:`688`。"
757771
758- #: ../../library/collections.abc.rst:369
772+ #: ../../library/collections.abc.rst:377
759773msgid "Examples and Recipes"
760774msgstr "例子和配方"
761775
762- #: ../../library/collections.abc.rst:371
776+ #: ../../library/collections.abc.rst:379
763777msgid ""
764778"ABCs allow us to ask classes or instances if they provide particular "
765779"functionality, for example::"
766780msgstr "ABC 允许我们询问类或实例是否提供特定的功能,例如::"
767781
768- #: ../../library/collections.abc.rst:374
782+ #: ../../library/collections.abc.rst:382
769783msgid ""
770784"size = None\n"
771785"if isinstance(myvar, collections.abc.Sized):\n"
@@ -775,7 +789,7 @@ msgstr ""
775789"if isinstance(myvar, collections.abc.Sized):\n"
776790" size = len(myvar)"
777791
778- #: ../../library/collections.abc.rst:378
792+ #: ../../library/collections.abc.rst:386
779793msgid ""
780794"Several of the ABCs are also useful as mixins that make it easier to develop"
781795" classes supporting container APIs. For example, to write a class "
@@ -790,7 +804,7 @@ msgstr ""
790804"和 :meth:`~object.__len__`。 ABC 会提供其余的方法如 :meth:`!__and__` 和 "
791805":meth:`~frozenset.isdisjoint`::"
792806
793- #: ../../library/collections.abc.rst:385
807+ #: ../../library/collections.abc.rst:393
794808msgid ""
795809"class ListBasedSet(collections.abc.Set):\n"
796810" ''' Alternate set implementation favoring space over speed\n"
@@ -836,11 +850,11 @@ msgstr ""
836850"s2 = ListBasedSet('defghi')\n"
837851"overlap = s1 & s2 # 自动支持 __and__() 方法"
838852
839- #: ../../library/collections.abc.rst:407
853+ #: ../../library/collections.abc.rst:415
840854msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:"
841855msgstr "当把 :class:`Set` 和 :class:`MutableSet` 用作混入类时需注意:"
842856
843- #: ../../library/collections.abc.rst:410
857+ #: ../../library/collections.abc.rst:418
844858msgid ""
845859"Since some set operations create new sets, the default mixin methods need a "
846860"way to create new instances from an :term:`iterable`. The class constructor "
@@ -858,7 +872,7 @@ msgstr ""
858872"混入类在具有不同构造器签名的类中被使用,你将需要通过一个能根据可迭代对象参数构造新实例的类方法或常规方法来重写 "
859873":meth:`!_from_iterable`。"
860874
861- #: ../../library/collections.abc.rst:421
875+ #: ../../library/collections.abc.rst:429
862876msgid ""
863877"To override the comparisons (presumably for speed, as the semantics are "
864878"fixed), redefine :meth:`~object.__le__` and :meth:`~object.__ge__`, then the"
@@ -867,7 +881,7 @@ msgstr ""
867881"要重写比较运算(应该是为了提高速度,因为其语义是固定的),请重新定义 :meth:`~object.__le__` 和 "
868882":meth:`~object.__ge__`,然后其他运算将自动跟进。"
869883
870- #: ../../library/collections.abc.rst:427
884+ #: ../../library/collections.abc.rst:435
871885msgid ""
872886"The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash "
873887"value for the set; however, :meth:`~object.__hash__` is not defined because "
@@ -879,14 +893,14 @@ msgstr ""
879893"没有被定义因为并非所有集合都是 :term:`hashable` 或不可变对象。 要使用混入类为集合添加可哈希性,请同时继承 :meth:`Set` 和"
880894" :meth:`Hashable`,然后定义 ``__hash__ = Set._hash``。"
881895
882- #: ../../library/collections.abc.rst:435
896+ #: ../../library/collections.abc.rst:443
883897msgid ""
884898"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ for an "
885899"example built on :class:`MutableSet`."
886900msgstr ""
887901"`OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ 是基于 "
888902":class:`MutableSet` 构建的一个示例。"
889903
890- #: ../../library/collections.abc.rst:438
904+ #: ../../library/collections.abc.rst:446
891905msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`."
892906msgstr "对于抽象基类,参见 :mod:`abc` 模块和 :pep:`3119`。"
0 commit comments