Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b4c7f39

Browse files
jmolinskirhettinger
authored andcommitted
Add module specification: itemgetter -> operator.itemgetter (GH-12823)
1 parent 9013ccf commit b4c7f39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/itertools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ which incur interpreter overhead.
827827
"List unique elements, preserving order. Remember only the element just seen."
828828
# unique_justseen('AAAABBBCCDAABBB') --> A B C D A B
829829
# unique_justseen('ABBCcAD', str.lower) --> A B C A D
830-
return map(next, map(itemgetter(1), groupby(iterable, key)))
830+
return map(next, map(operator.itemgetter(1), groupby(iterable, key)))
831831

832832
def iter_except(func, exception, first=None):
833833
""" Call a function repeatedly until an exception is raised.

0 commit comments

Comments
 (0)