[issue18511] random.shuffle could be faster

Raymond Hettinger report at bugs.python.org
Sat Jul 20 07:25:36 CEST 2013


Raymond Hettinger added the comment:

The reversed() call is only executed once and is not inside the loop body, so its runtime is irrelevant to most shuffles.   Also, the reason that reversed() is used is that is adds clarity to the code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18511>
_______________________________________


More information about the Python-bugs-list mailing list