Issue 27964: Add random.shuffled - Python tracker (original) (raw)
I'm at best -0 on the idea: very easy to get the effect without it, and hard to imagine it's needed frequently. sorted()
is also very easy to mimic, but is used often by all sorts of code. For example, to display output in a for key in sorted(dict):
loop, or to create a throwaway sorted list for testing, like:
assert data2[low: high] == sorted(data[low: high])
In my own code, I find hundreds of uses of sorted()
, but only a few dozen of random.shuffle()
, and in none of the latter cases would shuffled()
have been useful.