]> granicus.if.org Git - python/commitdiff
Replace all map(None, a) with list(a).
authorGeorg Brandl <georg@python.org>
Fri, 18 Jul 2008 19:06:13 +0000 (19:06 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 18 Jul 2008 19:06:13 +0000 (19:06 +0000)
Demo/tkinter/guido/rmt.py
Lib/string.py
Lib/stringold.py
Lib/test/test_grp.py
Lib/test/test_pwd.py

index 440650c9c48d3772413033d1f3b187439b70dfc2..bfea195d9dd61a48ea035b7f56c80e0439d3aa4d 100755 (executable)
@@ -134,7 +134,7 @@ def fillAppsMenu():
     file_m_apps.add('command')
     file_m_apps.delete(0, 'last')
     names = root.winfo_interps()
-    names = map(None, names) # convert tuple to list
+    names = list(names)
     names.sort()
     for name in names:
         try:
index eb680c23f8d338bb238c765fcd0f8bb31ed72a31..daf9863850ef21ac941f3326a077b83d16577467 100644 (file)
@@ -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)):
index 7cbd7aaf6b00c40d04d6ec4864ec430c2d1cd65e..ebfe38313a7f6ac0a3b96ead28839024c43986dc 100644 (file)
@@ -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)):
index a8dcb631f4dcd669ade15595550bbd9be8da2eca..564c7f006717b2f773dc745c90eb9ad61295eea0 100755 (executable)
@@ -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)
 
index 74ce9475f907a8efd6d22f1d8baaad4bda70dc4d..255a34c6d4730411b61713a0692600f98e0deedc 100644 (file)
@@ -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)