[New-bugs-announce] [issue26393] random.shuffled
report at bugs.python.org
Fri Feb 19 14:32:21 EST 2016
New submission from Aviv Palivoda:
I am suggesting adding random.shuffled to the random module. This is very similar to the shuffle function just return a new shuffled list instead of in place shuffle. This is very similar to the sorted and list.sort.
As you can see in the patch the shuffled function just return random.sample(x, len(x)) as this is what i usually do when i want to get back a shuffled list.
components: Library (Lib)
nosy: mark.dickinson, palaviv, rhettinger
versions: Python 3.6
Added file: http://bugs.python.org/file41976/random-shuffled.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce