[Python-checkins] r68379 - in python/branches/py3k: Doc/library/random.rst Lib/random.py
mark.dickinson
python-checkins at python.org
Wed Jan 7 18:54:08 CET 2009
Author: mark.dickinson
Date: Wed Jan 7 18:54:07 2009
New Revision: 68379
Log:
Merged revisions 68378 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68378 | mark.dickinson | 2009-01-07 17:48:33 +0000 (Wed, 07 Jan 2009) | 2 lines
Issue #4869: clarify documentation for random.expovariate.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/library/random.rst
python/branches/py3k/Lib/random.py
Modified: python/branches/py3k/Doc/library/random.rst
==============================================================================
--- python/branches/py3k/Doc/library/random.rst (original)
+++ python/branches/py3k/Doc/library/random.rst Wed Jan 7 18:54:07 2009
@@ -169,9 +169,11 @@
.. function:: expovariate(lambd)
- Exponential distribution. *lambd* is 1.0 divided by the desired mean. (The
- parameter would be called "lambda", but that is a reserved word in Python.)
- Returned values range from 0 to positive infinity.
+ Exponential distribution. *lambd* is 1.0 divided by the desired
+ mean. It should be nonzero. (The parameter would be called
+ "lambda", but that is a reserved word in Python.) Returned values
+ range from 0 to positive infinity if *lambd* is positive, and from
+ negative infinity to 0 if *lambd* is negative.
.. function:: gammavariate(alpha, beta)
Modified: python/branches/py3k/Lib/random.py
==============================================================================
--- python/branches/py3k/Lib/random.py (original)
+++ python/branches/py3k/Lib/random.py Wed Jan 7 18:54:07 2009
@@ -396,9 +396,11 @@
def expovariate(self, lambd):
"""Exponential distribution.
- lambd is 1.0 divided by the desired mean. (The parameter would be
- called "lambda", but that is a reserved word in Python.) Returned
- values range from 0 to positive infinity.
+ lambd is 1.0 divided by the desired mean. It should be
+ nonzero. (The parameter would be called "lambda", but that is
+ a reserved word in Python.) Returned values range from 0 to
+ positive infinity if lambd is positive, and from negative
+ infinity to 0 if lambd is negative.
"""
# lambd: rate lambd = 1/mean
More information about the Python-checkins
mailing list