Added 'list_only' option (and modified 'run()' to respect it).
[python/dscho.git] / Doc / lib / librand.tex
blobe33571847935761dca1abd10aff1d7c50cb80dff
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{whrandom}{the standard Python random number generator}
30 \end{seealso}