diff options
author | Raymond Hettinger <python@rcn.com> | 2004-12-04 10:50:51 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-12-04 10:50:51 (GMT) |
commit | 784ab76c873496daac30b4ab9e6afd2800762072 (patch) | |
tree | 94184a18ff7f165562eab08022a6ad1b193bbc01 /Doc/lib | |
parent | 2238fc6b677297e3c6370fa3ef728256a34f40ce (diff) | |
download | cpython-784ab76c873496daac30b4ab9e6afd2800762072.zip cpython-784ab76c873496daac30b4ab9e6afd2800762072.tar.gz cpython-784ab76c873496daac30b4ab9e6afd2800762072.tar.bz2 |
Remove the deprecated whrandom module.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/lib.tex | 2 | ||||
-rw-r--r-- | Doc/lib/librand.tex | 31 | ||||
-rw-r--r-- | Doc/lib/libwhrandom.tex | 74 |
3 files changed, 0 insertions, 107 deletions
diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex index 20f65df..d8cb2de 100644 --- a/Doc/lib/lib.tex +++ b/Doc/lib/lib.tex @@ -124,7 +124,6 @@ and how to embed it in other applications. \input{libmath} \input{libcmath} \input{librandom} -\input{libwhrandom} \input{libbisect} \input{libcollections} \input{libheapq} @@ -354,7 +353,6 @@ and how to embed it in other applications. %\input{libcmpcache} %\input{libcmp} %\input{libni} -%\input{librand} %\input{libregex} %\input{libregsub} diff --git a/Doc/lib/librand.tex b/Doc/lib/librand.tex deleted file mode 100644 index 9b2c685..0000000 --- a/Doc/lib/librand.tex +++ /dev/null @@ -1,31 +0,0 @@ -\section{\module{rand} --- - None} -\declaremodule{standard}{rand} - -\modulesynopsis{None} - - -The \code{rand} module simulates the C library's \code{rand()} -interface, though the results aren't necessarily compatible with any -given library's implementation. While still supported for -compatibility, the \code{rand} module is now considered obsolete; if -possible, use the \code{whrandom} module instead. - - -\begin{funcdesc}{choice}{seq} -Returns a random element from the sequence \var{seq}. -\end{funcdesc} - -\begin{funcdesc}{rand}{} -Return a random integer between 0 and 32767, inclusive. -\end{funcdesc} - -\begin{funcdesc}{srand}{seed} -Set a starting seed value for the random number generator; \var{seed} -can be an arbitrary integer. -\end{funcdesc} - -\begin{seealso} - \seemodule{random}{Python's interface to random number generators.} - \seemodule{whrandom}{The random number generator used by default.} -\end{seealso} diff --git a/Doc/lib/libwhrandom.tex b/Doc/lib/libwhrandom.tex deleted file mode 100644 index c5df0ef..0000000 --- a/Doc/lib/libwhrandom.tex +++ /dev/null @@ -1,74 +0,0 @@ -\section{\module{whrandom} --- - Pseudo-random number generator} - -\declaremodule{standard}{whrandom} -\modulesynopsis{Floating point pseudo-random number generator.} - -\deprecated{2.1}{Use \refmodule{random} instead.} - -\note{This module was an implementation detail of the -\refmodule{random} module in releases of Python prior to 2.1. It is -no longer used. Please do not use this module directly; use -\refmodule{random} instead.} - -This module implements a Wichmann-Hill pseudo-random number generator -class that is also named \class{whrandom}. Instances of the -\class{whrandom} class conform to the Random Number Generator -interface described in section \ref{rng-objects}. They also offer the -following method, specific to the Wichmann-Hill algorithm: - -\begin{methoddesc}[whrandom]{seed}{\optional{x, y, z}} - Initializes the random number generator from the integers \var{x}, - \var{y} and \var{z}. When the module is first imported, the random - number is initialized using values derived from the current time. - If \var{x}, \var{y}, and \var{z} are either omitted or \code{0}, the - seed will be computed from the current system time. If one or two - of the parameters are \code{0}, but not all three, the zero values - are replaced by ones. This causes some apparently different seeds - to be equal, with the corresponding result on the pseudo-random - series produced by the generator. -\end{methoddesc} - -\begin{funcdesc}{choice}{seq} -Chooses a random element from the non-empty sequence \var{seq} and returns it. -\end{funcdesc} - -\begin{funcdesc}{randint}{a, b} -Returns a random integer \var{N} such that \code{\var{a}<=\var{N}<=\var{b}}. -\end{funcdesc} - -\begin{funcdesc}{random}{} -Returns the next random floating point number in the range [0.0 ... 1.0). -\end{funcdesc} - -\begin{funcdesc}{seed}{x, y, z} -Initializes the random number generator from the integers \var{x}, -\var{y} and \var{z}. When the module is first imported, the random -number is initialized using values derived from the current time. -\end{funcdesc} - -\begin{funcdesc}{uniform}{a, b} -Returns a random real number \var{N} such that \code{\var{a}<=\var{N}<\var{b}}. -\end{funcdesc} - -When imported, the \module{whrandom} module also creates an instance of -the \class{whrandom} class, and makes the methods of that instance -available at the module level. Therefore one can write either -\code{N = whrandom.random()} or: - -\begin{verbatim} -generator = whrandom.whrandom() -N = generator.random() -\end{verbatim} - -Note that using separate instances of the generator leads to -independent sequences of pseudo-random numbers. - -\begin{seealso} - \seemodule{random}{Generators for various random distributions and - documentation for the Random Number Generator - interface.} - \seetext{Wichmann, B. A. \& Hill, I. D., ``Algorithm AS 183: - An efficient and portable pseudo-random number generator'', - \citetitle{Applied Statistics} 31 (1982) 188-190.} -\end{seealso} |