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:

committed by
Nicolas Sebrecht

parent
068ac7c410
commit
19c43308b9
@ -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():
|
||||
|
Reference in New Issue
Block a user