Emanuel Barry added the comment: While I do see the desire to get your list back for such cases (I would have liked so, too, in some cases), it's inconsistent, as everything else operating in-place returns None.
Plus, having it return None helps you remember that you should keep the reference to your list around. What's more, making it return a value will often make newbies believe that they're two separate lists, and then wonder why the first one was shuffled too. This is error-prone, and these arguments are why it returns None. It has been discussed in the past -- See http://stackoverflow.com/questions/17649875/why-does-random-shuffle-return-none which is related to your issue, and http://stackoverflow.com/questions/240178/python-list-of-lists-changes-reflected-across-sublists-unexpectedly to see what I mean by confused newbies. ---------- nosy: +ebarry _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25811> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com