diff options
| author | Raymond Hettinger <python@rcn.com> | 2008-01-22 23:25:35 (GMT) |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2008-01-22 23:25:35 (GMT) |
| commit | 1dfde1ddc0e1980d67bd19e187252d4e52b4f7ce (patch) | |
| tree | 365fcd0e0d95e4ff612ca7184d441e6184f8b203 /Lib/test/test_builtin.py | |
| parent | 86def6cb2b8d6d8c7f239795fa7af57c97a5890d (diff) | |
| download | cpython-1dfde1ddc0e1980d67bd19e187252d4e52b4f7ce.zip cpython-1dfde1ddc0e1980d67bd19e187252d4e52b4f7ce.tar.gz cpython-1dfde1ddc0e1980d67bd19e187252d4e52b4f7ce.tar.bz2 | |
Replace map(None, *iterables) with zip(*iterables).
Diffstat (limited to 'Lib/test/test_builtin.py')
| -rw-r--r-- | Lib/test/test_builtin.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 2718bbf..e6ded81 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1100,18 +1100,6 @@ class BuiltinTest(unittest.TestCase): def test_map(self): self.assertEqual( - list(map(None, 'hello')), - [('h',), ('e',), ('l',), ('l',), ('o',)] - ) - self.assertEqual( - list(map(None, 'abcd', 'efg')), - [('a', 'e'), ('b', 'f'), ('c', 'g')] - ) - self.assertEqual( - list(map(None, range(3))), - [(0,), (1,), (2,)] - ) - self.assertEqual( list(map(lambda x: x*x, range(1,4))), [1, 4, 9] ) @@ -1146,17 +1134,9 @@ class BuiltinTest(unittest.TestCase): [1+4+1, 3+9+1, 7+2+0] ) self.assertEqual( - list(map(None, Squares(10))), - [(0,), (1,), (4,), (9,), (16,), (25,), (36,), (49,), (64,), (81,)] - ) - self.assertEqual( list(map(int, Squares(10))), [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] ) - self.assertEqual( - list(map(None, Squares(3), Squares(2))), - [(0,0), (1,1)] - ) def Max(a, b): if a is None: return b @@ -1169,7 +1149,6 @@ class BuiltinTest(unittest.TestCase): ) self.assertRaises(TypeError, map) self.assertRaises(TypeError, map, lambda x: x, 42) - self.assertEqual(list(map(None, [42])), [(42,)]) class BadSeq: def __iter__(self): raise ValueError |
