diff options
Diffstat (limited to 'Lib/random.py')
-rw-r--r-- | Lib/random.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/random.py b/Lib/random.py index f355eac..0a02787 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -197,9 +197,9 @@ class Random(_random.Random): if istep != step: raise ValueError, "non-integer step for randrange()" if istep > 0: - n = (width + istep - 1) / istep + n = (width + istep - 1) // istep elif istep < 0: - n = (width + istep + 1) / istep + n = (width + istep + 1) // istep else: raise ValueError, "zero step for randrange()" |