Skip to content

Commit 1524e3f

Browse files
authored
Mention the absolute value is used for seed()
1 parent 4629567 commit 1524e3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/random.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ Bookkeeping functions
7878
instead of the system time (see the :func:`os.urandom` function for details
7979
on availability).
8080

81-
If *a* is an int, it is used directly.
81+
If *a* is an int, its absolute value is used directly.
8282

8383
With version 2 (the default), a :class:`str`, :class:`bytes`, or :class:`bytearray`
84-
object gets converted to an :class:`int` and all of its bits are used.
84+
object gets converted to an :class:`int` and all of its bits except the sign are used.
8585

8686
With version 1 (provided for reproducing random sequences from older versions
8787
of Python), the algorithm for :class:`str` and :class:`bytes` generates a

0 commit comments

Comments
 (0)