diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-02-01 04:59:18 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-02-01 04:59:18 (GMT) |
commit | 0de88fc4b108751b86443852b6741680d704168f (patch) | |
tree | a3824b12e3ed7dc1d65667388a4ace86f7fffe6e /Misc/NEWS | |
parent | 0eb107068a4a66d9c4df7276ca330b7d0312645e (diff) | |
download | cpython-0de88fc4b108751b86443852b6741680d704168f.zip cpython-0de88fc4b108751b86443852b6741680d704168f.tar.gz cpython-0de88fc4b108751b86443852b6741680d704168f.tar.bz2 |
Change random.seed() so that it can get at the full range of possible
internal states. Put the old .seed() (which could only get at about
the square root of the # of possibilities) under the new name .whseed(),
for bit-level compatibility with older versions. This occurred to me
while reviewing effbot's book (he found himself stumbling over .seed()
more than once there ...).
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -32,6 +32,16 @@ Standard library each thread, then using .jumpahead() to force each instance to use a non-overlapping segment of the full period. +- random.py's seed() function is new. For bit-for-bit compatibility with + prior releases, use the whseed function instead. The new seed function + addresses two problems: (1) The old function couldn't produce more than + about 2**24 distinct internal states; the new one about 2**45 (the best + that can be done in the Wichmann-Hill generator). (2) The old function + sometimes produced identical internal states when passed distinct + integers, and there was no simple way to predict when that would happen; + the new one guarantees to produce distinct internal states for all + arguments in [0, 27814431486576L). + Windows changes - Build procedure: the zlib project is built in a different way that |