@@ -391,7 +391,7 @@ msgid ""
391391"The following module functions all construct and return iterators. Some "
392392"provide streams of infinite length, so they should only be accessed by "
393393"functions or loops that truncate the stream."
394- msgstr "下列模块内函数均构建并返回迭代器 。有些迭代器不限制输出流长度,所以它们只应被能截断输出流的函数或循环使用 。"
394+ msgstr "下列模块函数均创建并返回迭代器 。有些迭代器不限制输出流长度,所以它们只应在能截断输出流的函数或循环中使用 。"
395395
396396#: ../../library/itertools.rst:91
397397msgid ""
@@ -771,6 +771,7 @@ msgid ""
771771"used anywhere else; otherwise, the *iterable* could get advanced without the"
772772" tee objects being informed."
773773msgstr ""
774+ "一旦 :func:`tee` 实施了一次分裂,原有的 *iterable* 不应再被使用;否则tee对象无法得知 *iterable* 可能已向后迭代。"
774775
775776#: ../../library/itertools.rst:631
776777msgid ""
@@ -779,6 +780,8 @@ msgid ""
779780"most or all of the data before another iterator starts, it is faster to use "
780781":func:`list` instead of :func:`tee`."
781782msgstr ""
783+ "该迭代工具可能需要相当大的辅助存储空间(这取决于要保存多少临时数据)。通常,如果一个迭代器在另一个迭代器开始之前就要使用大部份或全部数据,使用 "
784+ ":func:`list` 会比 :func:`tee` 更快。"
782785
783786#: ../../library/itertools.rst:639
784787msgid ""
@@ -787,6 +790,8 @@ msgid ""
787790"*fillvalue*. Iteration continues until the longest iterable is exhausted. "
788791"Roughly equivalent to::"
789792msgstr ""
793+ "创建一个迭代器,从每个可迭代对象中收集元素。如果可迭代对象的长度未对齐,将根据 *fillvalue* "
794+ "填充缺失值。迭代持续到耗光最长的可迭代对象。大致相当于:"
790795
791796#: ../../library/itertools.rst:663
792797msgid ""
@@ -795,16 +800,18 @@ msgid ""
795800"the number of calls (for example :func:`islice` or :func:`takewhile`). If "
796801"not specified, *fillvalue* defaults to ``None``."
797802msgstr ""
803+ "如果其中一个可迭代对象有无限长度,:func:`zip_longest` 函数应封装在限制调用次数的场景中(例如 :func:`islice` 或 "
804+ ":func:`takewhile`)。除非指定, *fillvalue* 默认为 ``None`` 。"
798805
799806#: ../../library/itertools.rst:672
800807msgid "Itertools Recipes"
801- msgstr ""
808+ msgstr "Itertools食谱 "
802809
803810#: ../../library/itertools.rst:674
804811msgid ""
805812"This section shows recipes for creating an extended toolset using the "
806813"existing itertools as building blocks."
807- msgstr ""
814+ msgstr "本节将展示如何使用现有的itertools作为基础构件来创建扩展的工具集。 "
808815
809816#: ../../library/itertools.rst:677
810817msgid ""
@@ -816,10 +823,12 @@ msgid ""
816823"preferring \" vectorized\" building blocks over the use of for-loops and "
817824":term:`generator`\\ s which incur interpreter overhead."
818825msgstr ""
826+ "扩展的工具提供了与底层工具集相同的高性能。保持了超棒的内存利用率,因为一次只处理一个元素,而不是将整个可迭代对象加载到内存。代码量保持得很小,以函数式风格将这些工具连接在一起,有助于消除临时变量。速度依然很快,因为倾向于使用“矢量化”构件来取代解释器开销大的for循环和"
827+ " :term:`生成器` 。"
819828
820829#: ../../library/itertools.rst:899
821830msgid ""
822831"Note, many of the above recipes can be optimized by replacing global lookups"
823832" with local variables defined as default values. For example, the "
824833"*dotproduct* recipe can be written as::"
825- msgstr ""
834+ msgstr "注意,通过将全局查找替换为局部变量的缺省值,上述配方中有很多可以这样优化。例如, *dotproduct* 配方可以这样写: "
0 commit comments