[Python-checkins] Add module specification: itemgetter -> operator.itemgetter (GH-12823)
Raymond Hettinger
webhook-mailer at python.org
Tue Apr 23 04:36:37 EDT 2019
https://github.com/python/cpython/commit/b4c7f39bbf8f16a0da758601b33aec3ba531c8d6
commit: b4c7f39bbf8f16a0da758601b33aec3ba531c8d6
branch: master
author: Jakub Molinski <jakub at molinski.dev>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2019-04-23T01:30:30-07:00
summary:
Add module specification: itemgetter -> operator.itemgetter (GH-12823)
files:
M Doc/library/itertools.rst
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 3d4e5836cf20..b3a0a5f5192d 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.
More information about the Python-checkins
mailing list