[Python-3000-checkins] r60354 - python/branches/py3k/Lib/glob.py

alexandre.vassalotti python-3000-checkins at python.org
Sun Jan 27 17:16:19 CET 2008


Author: alexandre.vassalotti
Date: Sun Jan 27 17:16:19 2008
New Revision: 60354

Modified:
   python/branches/py3k/Lib/glob.py
Log:
Fix build error.
Use a list comprehension instead of filter(), since filter() needs the
itertools module which isn't available at build time.


Modified: python/branches/py3k/Lib/glob.py
==============================================================================
--- python/branches/py3k/Lib/glob.py	(original)
+++ python/branches/py3k/Lib/glob.py	Sun Jan 27 17:16:19 2008
@@ -57,7 +57,7 @@
     except os.error:
         return []
     if pattern[0] != '.':
-        names = filter(lambda x: x[0] != '.', names)
+        names = [x for x in names if x[0] != '.']
     return fnmatch.filter(names, pattern)
 
 def glob0(dirname, basename):


More information about the Python-3000-checkins mailing list