commit | 5425a673316af04bd1e449e45d2d9c03ee1cce25 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Dec 20 07:43:59 2006 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Wed Dec 20 07:43:59 2006 +0000 |
tree | 465270c497b4f83d0e2000446f9c4958849fdd61 | |
parent | e65f14fcc32bbc158d222408ec310a306714ec12 [diff] [blame] |
Bug #1590891: random.randrange don't return correct value for big number
diff --git a/Lib/random.py b/Lib/random.py index ae2d434..b80f1a1 100644 --- a/Lib/random.py +++ b/Lib/random.py
@@ -205,7 +205,7 @@ raise ValueError, "empty range for randrange()" if n >= maxwidth: - return istart + self._randbelow(n) + return istart + istep*self._randbelow(n) return istart + istep*int(self.random() * n) def randint(self, a, b):