@@ -1156,17 +1156,21 @@ msgid ""
11561156" The specific types are not important beyond their implementation of the "
11571157"iterator protocol."
11581158msgstr ""
1159+ "Python 定义了几种迭代器对象以支持对一般和特定序列类型、字典和其他更特别的形式进行迭代。 "
1160+ "除了迭代器协议的实现,特定类型的其他性质对迭代操作来说都不重要。"
11591161
11601162#: ../../library/stdtypes.rst:790
11611163msgid ""
11621164"Once an iterator's :meth:`~iterator.__next__` method raises "
11631165":exc:`StopIteration`, it must continue to do so on subsequent calls. "
11641166"Implementations that do not obey this property are deemed broken."
11651167msgstr ""
1168+ "一旦迭代器的 :meth:`~iterator.__next__` 方法引发了 "
1169+ ":exc:`StopIteration`,它必须一直对后续调用引发同样的异常。 不遵循此行为特性的实现将无法正常使用。"
11661170
11671171#: ../../library/stdtypes.rst:798
11681172msgid "Generator Types"
1169- msgstr ""
1173+ msgstr "生成器类型 "
11701174
11711175#: ../../library/stdtypes.rst:800
11721176msgid ""
@@ -1177,10 +1181,14 @@ msgid ""
11771181":meth:`~generator.__next__` methods. More information about generators can "
11781182"be found in :ref:`the documentation for the yield expression <yieldexpr>`."
11791183msgstr ""
1184+ "Python 的 :term:`generator` 提供了一种实现迭代器协议的便捷方式。 如果容器对象 :meth:`__iter__` "
1185+ "方法被实现为一个生成器,它将自动返回一个迭代器对象(从技术上说是一个生成器对象),该对象提供 :meth:`__iter__` 和 "
1186+ ":meth:`~generator.__next__` 方法。 有关生成器的更多信息可以参阅 :ref:`yield 表达式的文档 "
1187+ "<yieldexpr>`。"
11801188
11811189#: ../../library/stdtypes.rst:812
11821190msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`"
1183- msgstr ""
1191+ msgstr "序列类型 --- :class:`list`, :class:`tuple`, :class:`range` "
11841192
11851193#: ../../library/stdtypes.rst:814
11861194msgid ""
@@ -1189,10 +1197,12 @@ msgid ""
11891197"<binaryseq>` and :ref:`text strings <textseq>` are described in dedicated "
11901198"sections."
11911199msgstr ""
1200+ "有三种基本序列类型:list, tuple 和 range 对象。 为处理 :ref:`二进制数据 <binaryseq>` 和 :ref:`文本字符串"
1201+ " <textseq>` 而特别定制的附加序列类型会在专门的小节中描述。"
11921202
11931203#: ../../library/stdtypes.rst:823
11941204msgid "Common Sequence Operations"
1195- msgstr ""
1205+ msgstr "常用序列操作 "
11961206
11971207#: ../../library/stdtypes.rst:827
11981208msgid ""
@@ -1201,6 +1211,8 @@ msgid ""
12011211"provided to make it easier to correctly implement these operations on custom"
12021212" sequence types."
12031213msgstr ""
1214+ "大多数序列类型,包括可变类型和不可变类型都支持下表中的操作。 :class:`collections.abc.Sequence` ABC "
1215+ "被提供用来更容易地在自定义序列类型上正确地实现这些操作。"
12041216
12051217#: ../../library/stdtypes.rst:832
12061218msgid ""
@@ -1209,6 +1221,8 @@ msgid ""
12091221" are integers and *x* is an arbitrary object that meets any type and value "
12101222"restrictions imposed by *s*."
12111223msgstr ""
1224+ "此表按优先级升序列出了序列操作。 在表格中,*s* 和 *t* 是具有相同类型的序列,*n*, *i*, *j* 和 *k* 是整数而 *x* "
1225+ "是任何满足 *s* 所规定的类型和值限制的任意对象。"
12121226
12131227#: ../../library/stdtypes.rst:837
12141228msgid ""
@@ -1217,18 +1231,20 @@ msgid ""
12171231"operations have the same priority as the corresponding numeric operations. "
12181232"[3]_"
12191233msgstr ""
1234+ "``in`` 和 ``not in`` 操作具有与比较操作相同的优先级。 ``+`` (拼接) 和 ``*`` (重复) "
1235+ "操作具有与对应数值运算相同的优先级。 [3]_"
12201236
12211237#: ../../library/stdtypes.rst:858
12221238msgid "``x in s``"
1223- msgstr ""
1239+ msgstr "``x in s`` "
12241240
12251241#: ../../library/stdtypes.rst:858
12261242msgid "``True`` if an item of *s* is equal to *x*, else ``False``"
1227- msgstr ""
1243+ msgstr "如果 *s* 中的某项等于 *x* 则结果为 ``True``,否则为 ``False`` "
12281244
12291245#: ../../library/stdtypes.rst:861
12301246msgid "``x not in s``"
1231- msgstr ""
1247+ msgstr "``x not in s`` "
12321248
12331249#: ../../library/stdtypes.rst:861
12341250msgid "``False`` if an item of *s* is equal to *x*, else ``True``"
0 commit comments