cpython-withatomic / Doc / librand.tex

The branch 'legacy-trunk' does not exist.
\section{Standard Module \sectcode{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)}

Returns a random element from the sequence \var{seq}.

Return a random integer between 0 and 32767, inclusive.

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

\seemodule{whrandom}{the standard Python random number generator}