summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
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 /Lib/random.py
parentab7b0a03b51c01e702cbe950b387807ee832af82 (diff)
downloadcpython-16eb827b33cc271eebd521246ebefd4d49470df8.zip
cpython-16eb827b33cc271eebd521246ebefd4d49470df8.tar.gz
cpython-16eb827b33cc271eebd521246ebefd4d49470df8.tar.bz2
Improve docs for random.seed()
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 06513c8..4efbb0a 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -96,11 +96,13 @@ class Random(_random.Random):
None or no argument seeds from current time or from an operating
system specific randomness source if available.
- For version 2 (the default), all of the bits are used if *a* is a str,
- bytes, or bytearray. For version 1, the hash() of *a* is used instead.
-
If *a* is an int, all bits are used.
+ For version 2 (the default), all of the bits are used if *a* is a str,
+ bytes, or bytearray. For version 1 (provided for reproducing random
+ sequences from older versions of Python), the algorithm for str and
+ bytes generates a narrower range of seeds.
+
"""
if a is None: