replace with list comp

This commit is contained in:
Benjamin Peterson
2010-11-06 18:34:00 -05:00
parent 885c7ce281
commit 107b04d462
+1 -1
View File
@@ -376,7 +376,7 @@ class Config(object):
elif type == "args":
return py.std.shlex.split(value)
elif type == "linelist":
return filter(None, map(lambda x: x.strip(), value.split("\n")))
return [t for t in map(lambda x: x.strip(), value.split("\n")) if t]
else:
assert type is None
return value