Staging
v0.5.1
https://github.com/python/cpython
Revision 2003204ba71ab3cac54015ef9fc6171f4e825953 authored by Guido van Rossum on 29 December 1997, 19:26:28 UTC, committed by Guido van Rossum on 29 December 1997, 19:26:28 UTC
1 parent 6884e3b
Raw File
Tip revision: 2003204ba71ab3cac54015ef9fc6171f4e825953 authored by Guido van Rossum on 29 December 1997, 19:26:28 UTC
Added doc string, provided by Charles Waldman (with some reformatting
Tip revision: 2003204
librand.tex
\section{Standard Module \sectcode{rand}}
\label{module-rand}
\stmodindex{rand}

The \code{rand} module simulates the C library's \code{rand()}
interface, though the results aren't necessarily compatible with any
given library's implementation.  While still supported for
compatibility, the \code{rand} module is now considered obsolete; if
possible, use the \code{whrandom} module instead.

\renewcommand{\indexsubitem}{(in module rand)}

\begin{funcdesc}{choice}{seq}
Returns a random element from the sequence \var{seq}.
\end{funcdesc}

\begin{funcdesc}{rand}{}
Return a random integer between 0 and 32767, inclusive.
\end{funcdesc}

\begin{funcdesc}{srand}{seed}
Set a starting seed value for the random number generator; \var{seed}
can be an arbitrary integer. 
\end{funcdesc}

\begin{seealso}
\seemodule{whrandom}{the standard Python random number generator}
\end{seealso}

back to top