cmbi / whynot2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace top_highest with mongo query

jonblack opened this issue · comments

The top_highest class is a list wrapper that keeps track of the top n entries. Not only is it poorly implemented (inefficient, not pythonic, doesn't implement the iterator interface), it's also unnecessary: the same functionality can be provided by sorting and limiting in the mongo query.