File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -588,6 +588,8 @@ msgid ""
588588"and returns the element unchanged. Generally, the iterable needs to already"
589589" be sorted on the same key function."
590590msgstr ""
591+ "创建一个迭代器,返回 *iterable* 中连续的键和组。*key* 是一个计算元素键值函数。如果未指定或为 ``None``,*key* "
592+ "缺省为恒等函数(identity function),返回元素不变。一般来说,*iterable* 需用同一个键值函数预先排序。"
591593
592594#: ../../library/itertools.rst:372
593595msgid ""
@@ -597,6 +599,9 @@ msgid ""
597599" the same key function). That behavior differs from SQL's GROUP BY which "
598600"aggregates common elements regardless of their input order."
599601msgstr ""
602+ ":func:`groupby` 操作类似于Unix中的 ``uniq``。当每次 *key* "
603+ "函数产生的键值改变时,迭代器会分组或生成一个新组(这就是为什么通常需要使用同一个键值函数先对数据进行排序)。这种行为与SQL的GROUP "
604+ "BY操作不同,SQL的操作会忽略输入的顺序将相同键值的元素分在同组中。"
600605
601606#: ../../library/itertools.rst:378
602607msgid ""
You can’t perform that action at this time.
0 commit comments