0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 16:45:42 +01:00
cpython/Doc/lib/librand.tex
Guido van Rossum e47da0ae04 AMK's megapatch:
* \bcode, \ecode added everywhere
	* \label{module-foo} added everywhere
	* A few \seealso sections added.
	* Indentation fixed inside verbatim in lib*tex files
1997-07-17 16:34:52 +00:00

28 lines
832 B
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.
\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}