summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-12-13 11:59:13 -0800
committerDylan Baker <dylan@pnwbakers.com>2016-12-13 12:34:15 -0800
commited05579acda72f2d333961beca98e243df4e2b9a (patch)
tree8ce04a5d326c32375225fc93fb9b1f479eaa401e /alot
parent02431efd92060ea5d1f64bfc700ae9b1e5f4907d (diff)
Replace list comprehension with set comprehension
Instead of using set([l for l in list]) use {l for l in list} (which shouldn't be confused with a dict comprehension which requires the ':' in the first value}. This avoids creating a list before reducing it to a set. This feature is new in 2.7 and 3.3.
Diffstat (limited to 'alot')
-rw-r--r--alot/db/thread.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/db/thread.py b/alot/db/thread.py
index a1af1cd1..cfe9fa5d 100644
--- a/alot/db/thread.py
+++ b/alot/db/thread.py
@@ -59,7 +59,7 @@ class Thread(object):
except ValueError: # year is out of range
self._newest_date = None
- self._tags = set([t for t in thread.get_tags()])
+ self._tags = {t for t in thread.get_tags()}
self._messages = {} # this maps messages to its children
self._toplevel_messages = []