summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorJakub Molinski <jakub@molinski.dev>2019-04-23 08:30:30 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-04-23 08:30:30 (GMT)
commitb4c7f39bbf8f16a0da758601b33aec3ba531c8d6 (patch)
tree4014297608dc9f92354e829941aa5c9fd8bc0cd3 /Doc/library
parent9013ccf6d8037f6ae78145a42d194141cb10d332 (diff)
downloadcpython-b4c7f39bbf8f16a0da758601b33aec3ba531c8d6.zip
cpython-b4c7f39bbf8f16a0da758601b33aec3ba531c8d6.tar.gz
cpython-b4c7f39bbf8f16a0da758601b33aec3ba531c8d6.tar.bz2
Add module specification: itemgetter -> operator.itemgetter (GH-12823)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/itertools.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 3d4e583..b3a0a5f 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.