summaryrefslogtreecommitdiffstats
path: root/Doc/library/random.rst
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-09-14 03:32:35 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-09-14 03:32:35 (GMT)
commite0add764688a3f3237749e0c2830b669d2c76ca0 (patch)
treef69c0c5a605892fccf92fb7f25396dfcf2572231 /Doc/library/random.rst
parent56f37aa965e794046dad62ddef2cb63e59e4f357 (diff)
downloadcpython-e0add764688a3f3237749e0c2830b669d2c76ca0.zip
cpython-e0add764688a3f3237749e0c2830b669d2c76ca0.tar.gz
cpython-e0add764688a3f3237749e0c2830b669d2c76ca0.tar.bz2
#15831: document multiple signatures on different lines. Patch by Chris Jerdonek.
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r--Doc/library/random.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 3a7f131..1cd4d26 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -46,20 +46,20 @@ from sources provided by the operating system.
Bookkeeping functions:
-.. function:: seed([x], version=2)
+.. function:: seed(a=None, version=2)
Initialize the random number generator.
- If *x* is omitted or ``None``, the current system time is used. If
+ If *a* is omitted or ``None``, the current system time is used. If
randomness sources are provided by the operating system, they are used
instead of the system time (see the :func:`os.urandom` function for details
on availability).
- If *x* is an int, it is used directly.
+ 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 *x* is used instead.
+ the :func:`hash` of *a* is used instead.
.. versionchanged:: 3.2
Moved to the version 2 scheme which uses all of the bits in a string seed.
@@ -87,7 +87,8 @@ Bookkeeping functions:
Functions for integers:
-.. function:: randrange([start,] stop[, step])
+.. function:: randrange(stop)
+ randrange(start, stop[, step])
Return a randomly selected element from ``range(start, stop, step)``. This is
equivalent to ``choice(range(start, stop, step))``, but doesn't actually build a