summaryrefslogtreecommitdiffstats
path: root/Doc/library/random.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-09-07 04:44:52 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-09-07 04:44:52 (GMT)
commit0515661314c4e5b9235e07b2c46b8f456c7fadc3 (patch)
treeb8f06b2f3a9d5f9d99b91de02052f9bf38f6aff7 /Doc/library/random.rst
parent3051cc3a0d390ba153c07db9ce31a44700e332f2 (diff)
downloadcpython-0515661314c4e5b9235e07b2c46b8f456c7fadc3.zip
cpython-0515661314c4e5b9235e07b2c46b8f456c7fadc3.tar.gz
cpython-0515661314c4e5b9235e07b2c46b8f456c7fadc3.tar.bz2
Issues #7889, #9025 and #9379: Improvements to the random module.
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r--Doc/library/random.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 270518c..c690eea 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -98,6 +98,13 @@ Functions for integers:
equivalent to ``choice(range(start, stop, step))``, but doesn't actually build a
range object.
+ The positional argument pattern matches that of :func:`range`. Keyword arguments
+ should not be used because the function may use them in unexpected ways.
+
+ .. versionchanged:: 3.2
+ :meth:`randrange` is more sophisticated about producing equally distributed
+ values. Formerly it used a style like ``int(random()*n)`` which could produce
+ slightly uneven distributions.
.. function:: randint(a, b)