Issue 6261: Clarify behavior of random.uniform().

This commit is contained in:
Raymond Hettinger 2009-06-11 23:18:54 +00:00
parent 75b544886b
commit d97d1fdc60
2 changed files with 3 additions and 1 deletions

View file

@ -349,7 +349,7 @@ class Random(_random.Random):
## -------------------- uniform distribution -------------------
def uniform(self, a, b):
"""Get a random number in the range [a, b)."""
"Get a random number in the range [a, b) or [a, b] depending on rounding."
return a + (b-a) * self.random()
## -------------------- triangular --------------------