@@ -316,7 +316,7 @@ msgstr "p, q, ... [repeat=1]"
316316
317317#: ../../library/itertools.rst:69
318318msgid "cartesian product, equivalent to a nested for-loop"
319- msgstr "笛卡儿积 ,相当于嵌套的for循环"
319+ msgstr "笛卡尔积 ,相当于嵌套的for循环"
320320
321321#: ../../library/itertools.rst:70
322322msgid ":func:`permutations`"
@@ -615,7 +615,7 @@ msgstr ""
615615
616616#: ../../library/itertools.rst:390
617617msgid ":func:`groupby` is roughly equivalent to::"
618- msgstr ":func:`groupby` 大致相当于"
618+ msgstr ":func:`groupby` 大致相当于: "
619619
620620#: ../../library/itertools.rst:423
621621msgid ""
@@ -630,61 +630,69 @@ msgid ""
630630"structure has been flattened (for example, a multi-line report may list a "
631631"name field on every third line). Roughly equivalent to::"
632632msgstr ""
633+ "创建一个迭代器,返回从 *iterable* 里选中的元素。如果 *start* 不是0,跳过 *iterable* 中的元素,直到到达 *start*"
634+ " 这个位置。之后迭代器连续返回元素,除非 *step* 设置的值很高导致被跳过。如果 *stop* 为 "
635+ "``None``,迭代器耗光为止;否则,在指定的位置停止。与普通的切片不同,:func:`islice`不支持将 *start* , *stop* ,或"
636+ " *step* 设为负值。可用来从内部数据结构被压平的数据中提取相关字段(例如一个多行报告,它的名称字段出现在每三行上)。大致相当于:"
633637
634638#: ../../library/itertools.rst:458
635639msgid ""
636640"If *start* is ``None``, then iteration starts at zero. If *step* is "
637641"``None``, then the step defaults to one."
638- msgstr ""
642+ msgstr "如果 *start* 为 ``None``,迭代从0开始。如果 *step* 为 ``None`` ,步长缺省为1。 "
639643
640644#: ../../library/itertools.rst:464
641645msgid ""
642646"Return successive *r* length permutations of elements in the *iterable*."
643- msgstr ""
647+ msgstr "连续返回由 *iterable* 元素生成长度为 *r* 的排列。 "
644648
645649#: ../../library/itertools.rst:466
646650msgid ""
647651"If *r* is not specified or is ``None``, then *r* defaults to the length of "
648652"the *iterable* and all possible full-length permutations are generated."
649- msgstr ""
653+ msgstr "如果 *r* 未指定或为 ``None`` ,*r* 默认设置为 *iterable* 的长度,这种情况下,生成所有全长排列。 "
650654
651655#: ../../library/itertools.rst:470
652656msgid ""
653657"Permutations are emitted in lexicographic sort order. So, if the input "
654658"*iterable* is sorted, the permutation tuples will be produced in sorted "
655659"order."
656- msgstr ""
660+ msgstr "排列依字典序发出。因此,如果 *iterable* 是已排序的,排列元组将有序地产出。 "
657661
658662#: ../../library/itertools.rst:474
659663msgid ""
660664"Elements are treated as unique based on their position, not on their value."
661665" So if the input elements are unique, there will be no repeat values in "
662666"each permutation."
663- msgstr ""
667+ msgstr "即使元素的值相同,不同位置的元素也被认为是不同的。如果元素值都不同,每个排列中的元素值不会重复。 "
664668
665669#: ../../library/itertools.rst:505
666670msgid ""
667671"The code for :func:`permutations` can be also expressed as a subsequence of "
668672":func:`product`, filtered to exclude entries with repeated elements (those "
669673"from the same position in the input pool)::"
670674msgstr ""
675+ ":func:`permutations` 的代码也可被改写为 :func:`product` "
676+ "的子序列,只要将含有重复元素(来自输入中同一位置的)的项排除。"
671677
672678#: ../../library/itertools.rst:517
673679msgid ""
674680"The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero"
675681" when ``r > n``."
676- msgstr ""
682+ msgstr "当 ``0 <= r <= n`` ,返回项个数为 ``n! / (n-r)!`` ;当 ``r > n`` ,返回项个数为0。 "
677683
678684#: ../../library/itertools.rst:522
679685msgid "Cartesian product of input iterables."
680- msgstr ""
686+ msgstr "可迭代对象输入的笛卡儿积。 "
681687
682688#: ../../library/itertools.rst:524
683689msgid ""
684690"Roughly equivalent to nested for-loops in a generator expression. For "
685691"example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in "
686692"B)``."
687693msgstr ""
694+ "大致相当于生成器表达式中的嵌套循环。例如, ``product(A, B)`` 和 ``((x,y) for x in A for y in B)`` "
695+ "返回结果一样。"
688696
689697#: ../../library/itertools.rst:527
690698msgid ""
@@ -693,19 +701,22 @@ msgid ""
693701"if the input's iterables are sorted, the product tuples are emitted in "
694702"sorted order."
695703msgstr ""
704+ "嵌套循环像里程表那样循环变动,每次迭代时将最右侧的元素向后迭代。这种模式形成了一种字典序,因此如果输入的可迭代对象是已排序的,笛卡尔积元组依次序发出。"
696705
697706#: ../../library/itertools.rst:532
698707msgid ""
699708"To compute the product of an iterable with itself, specify the number of "
700709"repetitions with the optional *repeat* keyword argument. For example, "
701710"``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``."
702711msgstr ""
712+ "要计算可迭代对象自身的笛卡尔积,将可选参数 *repeat* 设定为要重复的次数。例如,``product(A, repeat=4)`` 和 "
713+ "``product(A, A, A, A)`` 是一样的。"
703714
704715#: ../../library/itertools.rst:536
705716msgid ""
706717"This function is roughly equivalent to the following code, except that the "
707718"actual implementation does not build up intermediate results in memory::"
708- msgstr ""
719+ msgstr "该函数大致相当于下面的代码,只不过实际实现方案不会在内存中创建中间结果。 "
709720
710721#: ../../library/itertools.rst:552
711722msgid ""
0 commit comments