On Jul 22, 7:55 am, Duncan Booth <duncan.bo...@invalid.invalid> wrote: > I find it interesting that the heapq functions tell you in the > documentation that they aren't suitable for use where n==1 or where n is > near the total size of the sequence whereas random.sample() chooses what it > thinks is the best algorithm based on the input. At the very least I would > have thought the heapq functions could check for n==1 and call min/max when > it is.
I've had the same thought myself a number of times, so I filed a bug: http://bugs.python.org/issue6614 -- http://mail.python.org/mailman/listinfo/python-list