Merged release21-maint changes.
[python/dscho.git] / Doc / lib / librand.tex
blob9b2c685b03454e7ba5d24dab108e3bf395b510d6
1 \section{\module{rand} ---
2 None}
3 \declaremodule{standard}{rand}
5 \modulesynopsis{None}
8 The \code{rand} module simulates the C library's \code{rand()}
9 interface, though the results aren't necessarily compatible with any
10 given library's implementation. While still supported for
11 compatibility, the \code{rand} module is now considered obsolete; if
12 possible, use the \code{whrandom} module instead.
15 \begin{funcdesc}{choice}{seq}
16 Returns a random element from the sequence \var{seq}.
17 \end{funcdesc}
19 \begin{funcdesc}{rand}{}
20 Return a random integer between 0 and 32767, inclusive.
21 \end{funcdesc}
23 \begin{funcdesc}{srand}{seed}
24 Set a starting seed value for the random number generator; \var{seed}
25 can be an arbitrary integer.
26 \end{funcdesc}
28 \begin{seealso}
29 \seemodule{random}{Python's interface to random number generators.}
30 \seemodule{whrandom}{The random number generator used by default.}
31 \end{seealso}