summaryrefslogtreecommitdiffstats
path: root/Doc/library/random.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-03-23 19:37:53 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-03-23 19:37:53 (GMT)
commitc4f7bab0a0cd208bcab3c4f6cd8324ed8d08f98e (patch)
treee9bbc49e42eab1df3707bf2ddd26c1cb38e1b634 /Doc/library/random.rst
parentbbc50eafe5cc7d2fa73b5b45eebc573c600db9ac (diff)
downloadcpython-c4f7bab0a0cd208bcab3c4f6cd8324ed8d08f98e.zip
cpython-c4f7bab0a0cd208bcab3c4f6cd8324ed8d08f98e.tar.gz
cpython-c4f7bab0a0cd208bcab3c4f6cd8324ed8d08f98e.tar.bz2
Adopt Nick's suggestion for useful default arguments.
Clean-up floating point issues by adding true division and float constants.
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r--Doc/library/random.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 505cc81..a064ac4 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -193,7 +193,12 @@ be found in any statistics text.
.. function:: triangular(low, high, mode)
Return a random floating point number *N* such that ``low <= N < high``
- and with the specified *mode* between those bounds.
+ and with the specified *mode* between those bounds.
+
+ If *mode* is not specified or is ``None``, it defaults to the midpoint
+ between the upper and lower bounds, producing a symmetric distribution.
+
+ The default values for *low* and *high* are zero and one.
.. function:: betavariate(alpha, beta)