[Python-Dev] a note in random.shuffle.doc ... (original) (raw)

Tim Peters tim.peters at gmail.com
Tue Jun 13 02🔞43 CEST 2006


[Raymond Hettinger]

I think the note is still useful, but the "rather small" wording should be replaced by something most precise (such as the value of n=len(x) where n! > 2**19997).

Note that I already removed it, and I'm not putting it back. The period of W-H was "so short" you could get into trouble, based on period alone, with a list of only 16 elements. The Twister is so much more capable in respect of both period and high-dimensional equidistribution properties that I think anyone sophisticated enough to understand an accurate warning correctly would have no need to be warned. Everyone else would find it a mix of confusing and scary, to no real end.

None of this is to say it couldn't be useful to have a digestible introduction to issues raised by use of deterministic PRNGs. But I don't think that one note in one docstring is actually "better than nothing" in that regard ;-)



More information about the Python-Dev mailing list