Issues 2186 and 2187. Move map() from itertools to builtins.
diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py
index a3815e2..dfa18c5 100644
--- a/Lib/test/seq_tests.py
+++ b/Lib/test/seq_tests.py
@@ -79,10 +79,10 @@
def __next__(self):
raise StopIteration
-from itertools import chain, imap
+from itertools import chain, map
def itermulti(seqn):
'Test multiple tiers of iterators'
- return chain(imap(lambda x:x, iterfunc(IterGen(Sequence(seqn)))))
+ return chain(map(lambda x:x, iterfunc(IterGen(Sequence(seqn)))))
class CommonTest(unittest.TestCase):
# The type to be tested
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
index 8ae1637..7969d6e 100644
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -260,10 +260,10 @@
def __next__(self):
raise StopIteration
-from itertools import chain, imap
+from itertools import chain, map
def L(seqn):
'Test multiple tiers of iterators'
- return chain(imap(lambda x:x, R(Ig(G(seqn)))))
+ return chain(map(lambda x:x, R(Ig(G(seqn)))))
class TestErrorHandling(unittest.TestCase):
# only for C implementation
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 13dc1f9..7d905d8 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -9,6 +9,7 @@
maxsize = test_support.MAX_Py_ssize_t
minsize = -maxsize-1
ifilter = filter
+imap = map
def lzip(*args):
return list(zip(*args))
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 9e3d64f..ca3c02e 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -1560,10 +1560,10 @@
def __next__(self):
raise StopIteration
-from itertools import chain, imap
+from itertools import chain
def L(seqn):
'Test multiple tiers of iterators'
- return chain(imap(lambda x:x, R(Ig(G(seqn)))))
+ return chain(map(lambda x:x, R(Ig(G(seqn)))))
class TestVariousIteratorArgs(unittest.TestCase):