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)
files: random-shuffled.patch
keywords: patch
messages: 260529
nosy: mark.dickinson, palaviv, rhettinger
priority: normal
severity: normal
status: open
title: random.shuffled
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41976/random-shuffled.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26393>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to