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

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 27 05:28:30 CET 2009


Jan Kanis wrote:
> I'd presume you could get
> any shuffle (in case you really cared) by calling random.shuffle
> repeatedly and reseeding the prng in between.

But how are you going to reseed the prng? To get
an equal likelihood of any shuffle, you need another
prng with a big enough state to generate seeds for
your first prng. But then you might just as well
shuffle based on that larger prng in the first place.

-- 
Greg



More information about the Python-ideas mailing list