From: Jakub Molinski Date: Tue, 23 Apr 2019 08:30:30 +0000 (+0200) Subject: Add module specification: itemgetter -> operator.itemgetter (GH-12823) X-Git-Tag: v3.8.0a4~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4c7f39bbf8f16a0da758601b33aec3ba531c8d6;p=python Add module specification: itemgetter -> operator.itemgetter (GH-12823) --- diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 3d4e5836cf..b3a0a5f519 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -827,7 +827,7 @@ which incur interpreter overhead. "List unique elements, preserving order. Remember only the element just seen." # unique_justseen('AAAABBBCCDAABBB') --> A B C D A B # unique_justseen('ABBCcAD', str.lower) --> A B C A D - return map(next, map(itemgetter(1), groupby(iterable, key))) + return map(next, map(operator.itemgetter(1), groupby(iterable, key))) def iter_except(func, exception, first=None): """ Call a function repeatedly until an exception is raised.