[Python-Dev] a note in random.shuffle.doc ... (original) (raw)
Terry Jones terry at jon.es
Sun Jun 11 00:01:40 CEST 2006
- Previous message: [Python-Dev] a note in random.shuffle.__doc__ ...
- Next message: [Python-Dev] a note in random.shuffle.__doc__ ...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] a note in random.shuffle.__doc__ ...
- Next message: [Python-Dev] a note in random.shuffle.__doc__ ...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]