summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-12-13 12:06:56 -0800
committerDylan Baker <dylan@pnwbakers.com>2016-12-13 12:34:15 -0800
commit5a7fea876b893101d0d534100ae6b521e275d4eb (patch)
tree71643f0517bb9f9c9321de9da408e5865f2ddf35 /alot
parentbd97b0f099a83cdfef9460a68d676a76999305ef (diff)
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.
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/thread.py2
1 files changed, 1 insertions, 1 deletions
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))