summaryrefslogtreecommitdiffstats
path: root/Doc/librand.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-01-02 01:22:07 (GMT)
committerGuido van Rossum <guido@python.org>1994-01-02 01:22:07 (GMT)
commit5fdeeeae2a12b9956cc84d62eae82f72cabc8664 (patch)
treeac0053479e10099850c8e0d06e31cb3afbf632bb /Doc/librand.tex
parent0b0719866e8a32d0a787e73bca9e79df1d1a74f8 (diff)
downloadcpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.zip
cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.tar.gz
cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.tar.bz2
Restructured library documentation
Diffstat (limited to 'Doc/librand.tex')
-rw-r--r--Doc/librand.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/librand.tex b/Doc/librand.tex
new file mode 100644
index 0000000..b03ac41
--- /dev/null
+++ b/Doc/librand.tex
@@ -0,0 +1,21 @@
+\section{Standard Module \sectcode{rand}}
+
+\stmodindex{rand} This module implements a pseudo-random number
+generator with an interface similar to \code{rand()} in C. It defines
+the following functions:
+
+\renewcommand{\indexsubitem}{(in module rand)}
+\begin{funcdesc}{rand}{}
+Returns an integer random number in the range [0 ... 32768).
+\end{funcdesc}
+
+\begin{funcdesc}{choice}{s}
+Returns a random element from the sequence (string, tuple or list)
+\var{s}.
+\end{funcdesc}
+
+\begin{funcdesc}{srand}{seed}
+Initializes the random number generator with the given integral seed.
+When the module is first imported, the random number is initialized with
+the current time.
+\end{funcdesc}