annotate Doc/librand.tex @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents 72986b716824
children 3468ea8645ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 \section{Standard Module \sectcode{rand}}
5261
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
2 \stmodindex{rand}
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
3
5261
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
4 The \code{rand} module simulates the C library's \code{rand()}
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
5 interface, though the results aren't necessarily compatible with any
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
6 given library's implementation. While still supported for
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
7 compatibility, the \code{rand} module is now considered obsolete; if
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
8 possible, use the \code{whrandom} module instead.
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
9
5261
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
10 \begin{funcdesc}{choice}{seq}
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
11 Returns a random element from the sequence \var{seq}.
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 \end{funcdesc}
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
13
5261
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
14 \begin{funcdesc}{rand}{}
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
15 Return a random integer between 0 and 32767, inclusive.
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 \end{funcdesc}
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
17
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
18 \begin{funcdesc}{srand}{seed}
5261
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
19 Set a starting seed value for the random number generator; \var{seed}
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
20 can be an arbitrary integer.
1471
2ec96140a36b Restructured library documentation
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 \end{funcdesc}
5261
72986b716824 New stuff by AMK.
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
22