summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-09-04 18:17:28 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-09-04 18:17:28 (GMT)
commit16eb827b33cc271eebd521246ebefd4d49470df8 (patch)
tree9798adf2b9a4025e3eb06d32e18cbcd2187c7c99 /Doc
parentab7b0a03b51c01e702cbe950b387807ee832af82 (diff)
downloadcpython-16eb827b33cc271eebd521246ebefd4d49470df8.zip
cpython-16eb827b33cc271eebd521246ebefd4d49470df8.tar.gz
cpython-16eb827b33cc271eebd521246ebefd4d49470df8.tar.bz2
Improve docs for random.seed()
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/random.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index df502a0..677090a 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -63,8 +63,11 @@ Bookkeeping functions:
If *a* is an int, it is used directly.
With version 2 (the default), a :class:`str`, :class:`bytes`, or :class:`bytearray`
- object gets converted to an :class:`int` and all of its bits are used. With version 1,
- the :func:`hash` of *a* is used instead.
+ object gets converted to an :class:`int` and all of its bits are used.
+
+ With version 1 (provided for reproducing random sequences from older versions
+ of Python), the algorithm for :class:`str` and :class:`bytes` generates a
+ narrower range of seeds.
.. versionchanged:: 3.2
Moved to the version 2 scheme which uses all of the bits in a string seed.