diff options
author | Fred Drake <fdrake@acm.org> | 2000-06-30 15:32:31 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-06-30 15:32:31 (GMT) |
commit | f0e88980f37691b603b517f51a37e7c7739f2536 (patch) | |
tree | 95b26a2beccb2df04fbc45115d018a81128dddba | |
parent | 2e7cbc2cda0f2dc60066f384bc7295bb245ca901 (diff) | |
download | cpython-f0e88980f37691b603b517f51a37e7c7739f2536.zip cpython-f0e88980f37691b603b517f51a37e7c7739f2536.tar.gz cpython-f0e88980f37691b603b517f51a37e7c7739f2536.tar.bz2 |
Document randrange().
-rw-r--r-- | Doc/lib/librandom.tex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/lib/librandom.tex b/Doc/lib/librandom.tex index e7f0d58..15ed69c 100644 --- a/Doc/lib/librandom.tex +++ b/Doc/lib/librandom.tex @@ -113,6 +113,7 @@ returns it. \end{funcdesc} \begin{funcdesc}{randint}{a, b} +\deprecated{2.0}{Use \function{randrange()} instead.} Returns a random integer \var{N} such that \code{\var{a} <= \var{N} <= \var{b}}. \end{funcdesc} @@ -122,6 +123,13 @@ Returns the next random floating point number in the range [0.0 ... 1.0). \end{funcdesc} +\begin{funcdesc}{randrange}{\optional{start,} stop\optional{, step}} +Return a randomly selected element from \code{range(\var{start}, +\var{stop}, \var{step})}. This is equivalent to +\code{choice(range(\var{start}, \var{stop}, \var{step}))}. +\versionadded{1.5.2} +\end{funcdesc} + \begin{funcdesc}{uniform}{a, b} Returns a random real number \var{N} such that \code{\var{a} <= \var{N} < \var{b}}. |