diff options
Diffstat (limited to 'Doc/lib/librandom.tex')
-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}}. |