Oops -- Lib/Test should be Lib/test, of course!
[python/dscho.git] / Doc / librand.tex
bloba48ea221d29c2891e3a2cabafeeb5e503cefd196
1 \section{Standard Module \module{rand}}
2 \label{module-rand}
3 \stmodindex{rand}
5 The \code{rand} module simulates the C library's \code{rand()}
6 interface, though the results aren't necessarily compatible with any
7 given library's implementation. While still supported for
8 compatibility, the \code{rand} module is now considered obsolete; if
9 possible, use the \code{whrandom} module instead.
12 \begin{funcdesc}{choice}{seq}
13 Returns a random element from the sequence \var{seq}.
14 \end{funcdesc}
16 \begin{funcdesc}{rand}{}
17 Return a random integer between 0 and 32767, inclusive.
18 \end{funcdesc}
20 \begin{funcdesc}{srand}{seed}
21 Set a starting seed value for the random number generator; \var{seed}
22 can be an arbitrary integer.
23 \end{funcdesc}
25 \begin{seealso}
26 \seemodule{whrandom}{the standard Python random number generator}
27 \end{seealso}