diff options
author | Georg Brandl <georg@python.org> | 2008-07-18 19:06:13 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-18 19:06:13 (GMT) |
commit | 74bbc79d10862727c9126f4f8d8868c021a389e4 (patch) | |
tree | b023834db1dfc875eb379a2f1d270a02988c856c /Lib | |
parent | e2886fd3ca357c4cf7c1584375d9b9bb55d476b7 (diff) | |
download | cpython-74bbc79d10862727c9126f4f8d8868c021a389e4.zip cpython-74bbc79d10862727c9126f4f8d8868c021a389e4.tar.gz cpython-74bbc79d10862727c9126f4f8d8868c021a389e4.tar.bz2 |
Replace all map(None, a) with list(a).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/string.py | 2 | ||||
-rw-r--r-- | Lib/stringold.py | 2 | ||||
-rwxr-xr-x | Lib/test/test_grp.py | 4 | ||||
-rw-r--r-- | Lib/test/test_pwd.py | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Lib/string.py b/Lib/string.py index eb680c2..daf9863 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -68,7 +68,7 @@ def maketrans(fromstr, tostr): raise ValueError, "maketrans arguments must have same length" global _idmapL if not _idmapL: - _idmapL = map(None, _idmap) + _idmapL = list(_idmap) L = _idmapL[:] fromstr = map(ord, fromstr) for i in range(len(fromstr)): diff --git a/Lib/stringold.py b/Lib/stringold.py index 7cbd7aa..ebfe383 100644 --- a/Lib/stringold.py +++ b/Lib/stringold.py @@ -391,7 +391,7 @@ def maketrans(fromstr, tostr): raise ValueError, "maketrans arguments must have same length" global _idmapL if not _idmapL: - _idmapL = map(None, _idmap) + _idmapL = list(_idmap) L = _idmapL[:] fromstr = map(ord, fromstr) for i in range(len(fromstr)): diff --git a/Lib/test/test_grp.py b/Lib/test/test_grp.py index a8dcb63..564c7f0 100755 --- a/Lib/test/test_grp.py +++ b/Lib/test/test_grp.py @@ -57,7 +57,7 @@ class GroupDatabaseTestCase(unittest.TestCase): namei = 0 fakename = allnames[namei] while fakename in bynames: - chars = map(None, fakename) + chars = list(fakename) for i in xrange(len(chars)): if chars[i] == 'z': chars[i] = 'A' @@ -74,7 +74,7 @@ class GroupDatabaseTestCase(unittest.TestCase): except IndexError: # should never happen... if so, just forget it break - fakename = ''.join(map(None, chars)) + fakename = ''.join(chars) self.assertRaises(KeyError, grp.getgrnam, fakename) diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py index 74ce947..255a34c 100644 --- a/Lib/test/test_pwd.py +++ b/Lib/test/test_pwd.py @@ -62,7 +62,7 @@ class PwdTest(unittest.TestCase): namei = 0 fakename = allnames[namei] while fakename in bynames: - chars = map(None, fakename) + chars = list(fakename) for i in xrange(len(chars)): if chars[i] == 'z': chars[i] = 'A' @@ -79,7 +79,7 @@ class PwdTest(unittest.TestCase): except IndexError: # should never happen... if so, just forget it break - fakename = ''.join(map(None, chars)) + fakename = ''.join(chars) self.assertRaises(KeyError, pwd.getpwnam, fakename) |