- hits = filter(lambda (idx, h):
- result.snippets[idx] is not None or ('fragment' in h and h['themes_hit']),
- enumerate(result.hits))
- # print "[tmpl: from %d hits selected %d]" % (len(result.hits), len(hits))
+ hits = [(idx, h)
+ for (idx, h) in enumerate(result.hits)
+ if result.snippets[idx] is not None or ('fragment' in h and h['themes_hit'])]