<div dir="ltr">Nice to know about random.sample! =)<br><br>I think what OP said can then be reduced to having
the default k in random.sample to be the iterable size. The existance
of random.sample is a very strong argument against "shuffled", and the only "feature" shuffled would have that random.sample doesn't have is that default size.<div><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">You cannot sort a sequence lazily<br></blockquote>You
can, but it probably wouldn't be efficient if you need all the values. On the other hand, if
you need just the 3 smaller values of a huge list... well, that's another
topic.<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-08 0:28 GMT-03:00 Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 8 September 2016 at 13:23, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
<br>
> Beyond that practical benefit, if you want<br>
> random-sampling-with-<wbr>replacement, then "map(random.choice, container)"<br>
<br>
</span>Oops, that was supposed to be "map(random.choice, itertools.repeat(container))".<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
Nick.<br>
<br>
--<br>
Nick Coghlan | <a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a> | Brisbane, Australia<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Danilo J. S. Bellini<br>---------------<br>"<i>It is not our business to set up prohibitions, but to arrive at conventions.</i>" (R. Carnap)<br></div>
</div>