[Python-Dev] a note in random.shuffle.__doc__ ...

Terry Jones terry at jon.es
Sun Jun 11 00:01:40 CEST 2006


That doc note should surely be removed.  Perhaps it's an artifact from some
earlier shuffle algorithm.

The current algorithm (which is simple, well known, and which produces all
permutations with equal probability) only calls the RNG len(x) - 1 times.

Terry


More information about the Python-Dev mailing list