[docs] Typo in Python 2.7 docs for random.random

Sandro Tosi sandro.tosi at gmail.com
Tue Jan 29 00:37:51 CET 2013


Hello Dimitri,
sorry for this late reply.

On Tue, Nov 20, 2012 at 11:30 PM, Dimitri Molenaars <tyrope at tyrope.nl> wrote:
> Greetings,
> http://docs.python.org/2.7/library/random.html?highlight=random.random#random.random
>
> This:
> Return the next random floating point number in the range [0.0, 1.0).
>
> should be:
> Return the next random floating point number in the range (0.0, 1.0).
> or
> Return the next random floating point number in the range [0.0, 1.0].

In mathematics, there's a syntax to express ranges without some of the
endpoints: http://en.wikipedia.org/wiki/Interval_(mathematics)#Excluding_the_endpoints

The why the range in the doc is expressed is to follow that notation.

Regards,
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the docs mailing list