Terry Jones wrote: > 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.
It's not a matter of how many times it's called, but of how much internal state it has. A generator with only N possible internal states can't possibly result in more than N different outcomes from any algorithm that uses its results. -- Greg _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
