Commits

Anonymous committed 037f3ce

Bug #1590891: random.randrange don't return correct value for big number

Comments (0)

Files changed (2)

             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):
 Core and builtins
 -----------------
 
+- Bug #1590891: random.randrange don't return correct value for big number
+
 - Bug #1542016: make sys.callstats() match its docstring and return an
   11-tuple (only relevant when Python is compiled with -DCALL_PROFILE).