Kaydet (Commit) f0e88980 authored tarafından Fred Drake's avatar Fred Drake

Document randrange().

üst 2e7cbc2c
......@@ -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}}.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment