[Python-checkins] CVS: python/dist/src/Misc NEWS,1.111,1.112

Tim Peters tim_one@users.sourceforge.net
Wed, 31 Jan 2001 20:59:20 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv14254/python/dist/src/Misc

Modified Files:
	NEWS 
Log Message:
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 ...).


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -r1.111 -r1.112
*** NEWS	2001/01/31 22:14:01	1.111
--- NEWS	2001/02/01 04:59:18	1.112
***************
*** 33,36 ****
--- 33,46 ----
    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