Преглед на файлове

Merge pull request #234 from Schnouki/patch-2

[post_stats] Python 3 compatibility
Justin Mayer преди 10 години
родител
ревизия
ade0c98505
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      post_stats/readability.py

+ 1 - 1
post_stats/readability.py

@@ -30,7 +30,7 @@ def normalize(text):
 def text_stats(text, wc):
     text = normalize(text)
     stcs = [s.split(" ") for s in text.split(". ")]
-    stcs = filter(lambda s: len(s) >= 2, stcs)
+    stcs = [s for s in stcs if len(s) >= 2]
 
     if wc:
         words = wc