mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Improve docs for random.seed()
This commit is contained in:
parent
ab7b0a03b5
commit
16eb827b33
2 changed files with 10 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue