summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-01 15:53:24 (GMT)
committerFred Drake <fdrake@acm.org>2001-02-01 15:53:24 (GMT)
commitd0946da7015471f8f28b7798f267609f5e74b367 (patch)
treeb1d6e203b467ae95c2571264d12b9a280b54c87b /Doc/lib
parentc2e35e6f37bb88e1efe2c0439556fc27eaca0c20 (diff)
downloadcpython-d0946da7015471f8f28b7798f267609f5e74b367.zip
cpython-d0946da7015471f8f28b7798f267609f5e74b367.tar.gz
cpython-d0946da7015471f8f28b7798f267609f5e74b367.tar.bz2
Fix some markup breakage that prevented formatting; re-wrapped a couple of
wide paragraphs.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/librandom.tex20
1 files changed, 10 insertions, 10 deletions
diff --git a/Doc/lib/librandom.tex b/Doc/lib/librandom.tex
index 862d466..d60ab79 100644
--- a/Doc/lib/librandom.tex
+++ b/Doc/lib/librandom.tex
@@ -70,16 +70,16 @@ def create_generators(num, delta, firstseed=None):
gens = create_generators(10, 1000000)
\end{verbatim}
-That creates 10 distinct generators, which can be passed out to 10 distinct
-threads. The generators don't share state so can be called safely in
-parallel. So long as no thread calls its \code{g.random()} more than a
-million times (the second argument to \function{create_generators), the
-sequences seen by each thread will not overlap. The period of the
-underlying Wichmann-Hill generator limits how far this technique can be
-pushed.
+That creates 10 distinct generators, which can be passed out to 10
+distinct threads. The generators don't share state so can be called
+safely in parallel. So long as no thread calls its \code{g.random()}
+more than a million times (the second argument to
+\function{create_generators()}, the sequences seen by each thread will
+not overlap. The period of the underlying Wichmann-Hill generator
+limits how far this technique can be pushed.
-Just for fun, note that since we know the period, \method{jumpahead()} can
-also be used to "move backward in time":
+Just for fun, note that since we know the period, \method{jumpahead()}
+can also be used to ``move backward in time:''
\begin{verbatim}
>>> g = Random(42) # arbitrary
@@ -100,7 +100,7 @@ Bookkeeping functions:
current system time is also used to initialize the generator when the
module is first imported.
If \var(x) is not \code{None} or an int or long,
- \code{hash(\var{x})) is used instead.
+ \code{hash(\var{x})} is used instead.
If \var{x} is an int or long, \var{x} is used directly.
Distinct values between 0 and 27814431486575L inclusive are guaranteed
to yield distinct internal states (this guarantee is specific to the