summaryrefslogtreecommitdiff
path: root/alot/commands/search.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-12-14 14:52:01 -0800
committerDylan Baker <dylan@pnwbakers.com>2016-12-21 17:09:25 -0800
commit68f64472f69a509b4245a0a2ca491a1256100ab9 (patch)
tree583f28be3c6ec629354460cf16f87acc06fd0d5d /alot/commands/search.py
parent5745e2291fb4d3c81076256d8bc563d50da16da5 (diff)
Replace map() and filter() with comprehensions
This had the advantage of being more readable to people without a functional programming background, and it avoids the need to use lambdas which are both slow and have many corners in python. In a few cases it also allows us to use a generator expression instead of a materialized list, which save some memory.
Diffstat (limited to 'alot/commands/search.py')
-rw-r--r--alot/commands/search.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py
index b8ecef6d..63572e68 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -211,7 +211,7 @@ class TagCommand(Command):
searchbuffer.result_count += (hitcount_after - hitcount_before)
ui.update()
- tags = filter(lambda x: x, self.tagsstring.split(','))
+ tags = [x for x in self.tagsstring.split(',') if x]
try:
if self.action == 'add':