Raymond Hettinger added the comment: Just so you know, in CPython the bisect version of nsmallest() isn't called at all. Instead, the C implementation is used and it employs the heap based algorithm rather than the bisect algorithm.
Instead of mucking with code that call nsmallest(), I'll likely just update nsmallest() at some point to use the same algorithm as the code for nlargest(). That with bring the C code and pure Python code fully in-sync. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16098> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com