Re: [Python-ideas] About adding a new iterator methodcalled"shuffled"

"Raymond" == Raymond Hettinger <python@rcn.com> writes:
Note that using sorting to shuffle is likely very inefficient.
Raymond> Who cares? The OP's goal was to save a few programmer clock Raymond> cycles so he could in-line what we already get from Raymond> random.shuffle(). Who cares? Jeez... did I say something to get your hackles up? I'm not sure if I see the original posting, but the one you first reference in the mailing list archives doesn't say anything about saving clock cycles. Supposing that is what he was after, posting a cute but O(n lg n) alternative without saying it's highly inefficient is directly counter to what you say he was looking for. The reason I even said anything was because someone (Roy?) then said "that's nice". That's like someone saying oh, you could do it like this with bubblesort, someone else saying "that's nice", and there the record stands, awaiting future generations of uneducated programmers. Anyway, apologies if you don't care or for commenting out loud on something that was perhaps obvious to everyone. BTW, I hadn't noticed Antoine's earlier message amounting to the same thing. He seems to care too :-) Terry
participants (1)
-
Terry Jones