[Python-ideas] About adding a new iteratormethodcalled "shuffled"

Tim Peters tim.peters at gmail.com
Thu Mar 26 18:55:22 CET 2009

[Adam Olsen]
> Is it or is it not broken?  That's all I want to know.

Then you first need to define what "broken" means to you.  Anything
short of a source of /true/ random numbers is "broken" for /some/

Python's current generator is not broken for any purposes I care
about, so my answer to your question is "no" -- but only if I ask your
question of myself ;-)

> Better would be a PRNG with a much larger period..

Not really.  A larger period is necessary but not sufficient /if/
you're concerned about generating all permutations of bigger lists
with equal probability -- see the old thread someone else pointed to
for more info on that.  The Mersenne Twister's provably superb
"high-dimensional equidistribution" properties are far more important
than its long period in this respect (the former is sufficient; the
latter is merely necessary).

More information about the Python-ideas mailing list