[Python-checkins] r84573 - in python/branches/py3k: Doc/library/random.rst Misc/NEWS
raymond.hettinger
python-checkins at python.org
Tue Sep 7 01:36:31 CEST 2010
Author: raymond.hettinger
Date: Tue Sep 7 01:36:31 2010
New Revision: 84573
Log:
Document which part of the random module module are guaranteed.
Modified:
python/branches/py3k/Doc/library/random.rst
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Doc/library/random.rst
==============================================================================
--- python/branches/py3k/Doc/library/random.rst (original)
+++ python/branches/py3k/Doc/library/random.rst Tue Sep 7 01:36:31 2010
@@ -270,3 +270,19 @@
<http://code.activestate.com/recipes/576707/>`_ for a compatible alternative
random number generator with a long period and comparatively simple update
operations.
+
+Notes on Reproducibility
+========================
+
+Sometimes it is useful to be able to reproduce the sequences given by a pseudo
+random number generator. By re-using a seed value, the same sequence should be
+reproducible from run to run as long as multiple threads are not running.
+
+Most of the random module's algorithms and seeding functions are subject to
+change across Python versions, but two aspects are guaranteed not to change:
+
+* If a new seeding method is added, then a backward compatible seeder will be
+ offered.
+
+* The generator's :meth:`random` method will continue to produce the same
+ sequence when the compatible seeder is given the same seed.
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Tue Sep 7 01:36:31 2010
@@ -13,6 +13,11 @@
Library
-------
+- Updates to the random module:
+
+ * Document which parts of the module are guaranteed to stay the same
+ across versions and which parts are subject to change.
+
- collections.OrderedDict now supports a new method for repositioning
keys to either end.
More information about the Python-checkins
mailing list