[Python-checkins] cpython (merge 3.2 -> default): merge doc fixes from 3.2

georg.brandl python-checkins at python.org
Sat Sep 17 20:39:16 CEST 2011


http://hg.python.org/cpython/rev/23e4b73937f7
changeset:   72394:23e4b73937f7
parent:      72391:d3e072083ff3
parent:      72393:e6407b2d2f0c
user:        Georg Brandl <georg at python.org>
date:        Sat Sep 17 20:40:35 2011 +0200
summary:
  merge doc fixes from 3.2

files:
  Doc/library/datetime.rst |  2 +-
  Doc/library/random.rst   |  7 +++++++
  2 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -30,7 +30,7 @@
 :class:`tzinfo` objects capture information about the offset from UTC time, the
 time zone name, and whether Daylight Saving Time is in effect.  Note that only
 one concrete :class:`tzinfo` class, the :class:`timezone` class, is supplied by the
-:mod:`datetime` module.  The :class:`timezone` class can reprsent simple
+:mod:`datetime` module.  The :class:`timezone` class can represent simple
 timezones with fixed offset from UTC such as UTC itself or North American EST and
 EDT timezones.  Supporting timezones at whatever level of detail is
 required is up to the application.  The rules for time adjustment across the
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -169,6 +169,7 @@
    The end-point value ``b`` may or may not be included in the range
    depending on floating-point rounding in the equation ``a + (b-a) * random()``.
 
+
 .. function:: triangular(low, high, mode)
 
    Return a random floating point number *N* such that ``low <= N <= high`` and
@@ -197,6 +198,12 @@
    Gamma distribution.  (*Not* the gamma function!)  Conditions on the
    parameters are ``alpha > 0`` and ``beta > 0``.
 
+   The probability distribution function is::
+
+                 x ** (alpha - 1) * math.exp(-x / beta)
+       pdf(x) =  --------------------------------------
+                   math.gamma(alpha) * beta ** alpha
+
 
 .. function:: gauss(mu, sigma)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list