mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue