[issue6614] heapq.nsmallest and nlargest should be smarter/more usable/more consistent

Joshua Bronson report at bugs.python.org
Fri Jul 31 21:36:04 CEST 2009


Joshua Bronson <jabronson at gmail.com> added the comment:

One more thing:

> I prefer the docs the way they are.  They help the reader understand
> the relationship between min, max, nsmallest, nlargest, and sorted.

The docs still use the unspecific language "for smaller values of n" and 
"for larger values". I think careful readers would appreciate an addition 
along the lines of what you wrote earlier -- the optimal switchover point 
depends on the cost of the comparison function, the ordering of the input 
data, etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6614>
_______________________________________


More information about the Python-bugs-list mailing list