Minor beautification

This commit is contained in:
Raymond Hettinger 2016-06-25 05:36:42 +03:00
parent a32c4d0531
commit 650c1c9ddd

View File

@ -606,11 +606,11 @@ class Random(_random.Random):
# This version due to Janne Sinkkonen, and matches all the std
# texts (e.g., Knuth Vol 2 Ed 3 pg 134 "the beta distribution").
y = self.gammavariate(alpha, 1.)
y = self.gammavariate(alpha, 1.0)
if y == 0:
return 0.0
else:
return y / (y + self.gammavariate(beta, 1.))
return y / (y + self.gammavariate(beta, 1.0))
## -------------------- Pareto --------------------