[Python-ideas] About adding a new iterator methodcalled"shuffled"
terry at jon.es
Tue Mar 24 23:46:22 CET 2009
>>>>> "Raymond" == Raymond Hettinger <python at 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
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 :-)
More information about the Python-ideas