Author vajrasky
Recipients rhettinger, stutzbach, tim.peters, vajrasky, vstinner, xdegaye
Date 2013-10-06.09:10:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have played around with this test.

The major issue (there are other issues as well but not so difficult) is whether nlargest and nsmallest should support iterator that could be endless iterator or reject it (by checking __len__ attribute) straight away.

Once we decide that, the fix should be not that hard.

For example, I want to get 2 largest numbers from fibonacci number series.

heapq.nlargest(2, fibonacci_iterator) => what is the answer for this?
Exception or let it be stuck forever.
Date User Action Args
2013-10-06 09:10:07vajraskysetrecipients: + vajrasky, tim.peters, rhettinger, vstinner, stutzbach, xdegaye
2013-10-06 09:10:07vajraskysetmessageid: <>
2013-10-06 09:10:07vajraskylinkissue19119 messages
2013-10-06 09:10:07vajraskycreate