Author jab
Recipients jab, rhettinger
Date 2009-07-31.18:18:44
SpamBayes Score 2.76706e-09
Marked as misclassified No
Message-id <>
Oh, that's great!

(I also noticed that the previously inutile line "_heappushpop = heappushpop" 
is now doing something in the you linked to, nice.)

It looks like the docs haven't been updated yet though. For instance, still says "The latter two 
functions perform best for smaller values of n. For larger values, it is more 
efficient to use the sorted() function. Also, when n==1, it is more efficient 
to use the builtin min() and max() functions."

Also, I notice the pure Python implementation of nsmallest still does that 
check to see if n * 10 <= len(iterable), and if so uses an insort-based 
algorithm. It looks like this is still undocumented, inconsistent with the C 
implementation, and asymmetrical to the implementations of nlargest. If this 
branch is remaining there on purpose, I'd love see its existence mentioned and 
its theoretical basis explained in the docs, along with any similar branches 
implemented elsewhere in the code, if they should be.
Date User Action Args
2009-07-31 18:18:46jabsetrecipients: + jab, rhettinger
2009-07-31 18:18:46jabsetmessageid: <>
2009-07-31 18:18:44jablinkissue6614 messages
2009-07-31 18:18:44jabcreate