[Python-ideas] About adding a new iterator methodcalled "shuffled"

Terry Jones terry at jon.es
Wed Mar 25 02:06:10 CET 2009


>>>>> "Greg" == Greg Ewing <greg.ewing at canterbury.ac.nz> writes:
Greg> *All* shuffling algorithms are limited by that.

Greg> Think about it: A shuffling algorithm is a function from a random
Greg> number to a permutation. There's no way you can get more permutations
Greg> out than there are random numbers to put in.

Hi Greg

Maybe we should put a note to that effect in random.shuffle.__doc__ :-)

  http://mail.python.org/pipermail/python-dev/2006-June/065815.html

Regards,
Terry



More information about the Python-ideas mailing list