diff MoinMoin/action/AttachFile.py @ 1866:0194beaf511e

reduce reduce, filter and map usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 10 Mar 2007 19:20:19 +0100
parents 2b24220424fa
children 64507f46beb2
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Fri Mar 09 00:56:44 2007 +0100
+++ b/MoinMoin/action/AttachFile.py	Sat Mar 10 19:20:19 2007 +0100
@@ -356,7 +356,7 @@
 def _get_files(request, pagename):
     attach_dir = getAttachDir(request, pagename)
     if os.path.isdir(attach_dir):
-        files = map(lambda a: a.decode(config.charset), os.listdir(attach_dir))
+        files = [fn.decode(config.charset) for fn in os.listdir(attach_dir)]
         files.sort()
         return files
     return []