Change filter with lambda to list comprehension

It is more readable and returns a list therefore it is compatible both
with Python 2 and 3.

Signed-off-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Łukasz Żarnowiecki
2016-05-08 16:55:13 +02:00
committed by Nicolas Sebrecht
parent 068ac7c410
commit 19c43308b9
5 changed files with 11 additions and 17 deletions

View File

@ -204,7 +204,7 @@ class MaildirFolder(BaseFolder):
retval[uid]['filename'] = filepath
if min_date != None:
# Re-include messages with high enough uid's.
positive_uids = filter(lambda uid: uid > 0, retval)
positive_uids = [uid for uid in retval if uid > 0]
if positive_uids:
min_uid = min(positive_uids)
for uid in date_excludees.keys():