From ec5103191ef8b519d91cee37eecab6cffe6be378 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 1 Nov 2015 08:14:31 -0800 Subject: [PATCH] Apply Python 3 futurize transform libmodernize.fixes.fix_filter. --- bots/summarize_stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/summarize_stream.py b/bots/summarize_stream.py index 2b00d5f..5095946 100644 --- a/bots/summarize_stream.py +++ b/bots/summarize_stream.py @@ -65,8 +65,8 @@ def generate_support_stats(): if True: words = word_count.keys() - words = filter(lambda w: word_count[w] >= 10, words) - words = filter(lambda w: len(w) >= 5, words) + words = [w for w in words if word_count[w] >= 10] + words = [w for w in words if len(w) >= 5] words = sorted(words, key=lambda w: word_count[w], reverse=True) for word in words: print(word, word_count[word])