]> granicus.if.org Git - python/commitdiff
Minor beautification
authorRaymond Hettinger <python@rcn.com>
Sat, 25 Jun 2016 02:36:42 +0000 (05:36 +0300)
committerRaymond Hettinger <python@rcn.com>
Sat, 25 Jun 2016 02:36:42 +0000 (05:36 +0300)
Lib/random.py

index 5950735e3ee54934ae5a5ba59a6a05b79d451933..1cffb0aaadc0a9893b2d4fbd724cc2c40cd8c7d8 100644 (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 --------------------