From 5a7fea876b893101d0d534100ae6b521e275d4eb Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 13 Dec 2016 12:06:56 -0800 Subject: Don't materialize with any() It's more efficient to use a generator here than a list comprehension, since then we can avoid calculating addresses we don't need. --- alot/commands/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alot/commands') diff --git a/alot/commands/thread.py b/alot/commands/thread.py index c8edf3bd..55920090 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -258,7 +258,7 @@ class ReplyCommand(Command): allrecipients = [to] + [cc] lists = settings.get('mailinglists') # check if any recipient address matches a known mailing list - if any([addr in lists for n, addr in getaddresses(allrecipients)]): + if any(addr in lists for n, addr in getaddresses(allrecipients)): followupto = ', '.join(allrecipients) logging.debug('mail followup to: %s', followupto) envelope.add('Mail-Followup-To', decode_header(followupto)) -- cgit v1.2.3