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 <1381050607.6.0.549957074187.issue19119@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-10-06 09:10:07vajraskysetrecipients: + vajrasky, tim.peters, rhettinger, vstinner, stutzbach, xdegaye
2013-10-06 09:10:07vajraskysetmessageid: <1381050607.6.0.549957074187.issue19119@psf.upfronthosting.co.za>
2013-10-06 09:10:07vajraskylinkissue19119 messages
2013-10-06 09:10:07vajraskycreate