[issue5669] Extra heapq nlargest/nsmallest option for including ties
George Sakkis
report at bugs.python.org
Sun Apr 5 18:06:20 CEST 2009
George Sakkis <george.sakkis at gmail.com> added the comment:
Posted recipe at http://code.activestate.com/recipes/576712/. You were
right, the implementation gets significantly hairier but I think it's
worth having this option. It's also faster than using sorted/bisect as
len(seq)/N increases and there is no pathologically high number of ties
at the last position (as in your test case).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5669>
_______________________________________
More information about the Python-bugs-list
mailing list