diff options
author | Raymond Hettinger <python@rcn.com> | 2004-09-27 15:29:05 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-09-27 15:29:05 (GMT) |
commit | ffdb8bb99c4017152a9dca70669f9d6b9831d454 (patch) | |
tree | 561cf9198f1aa05d12d126a1a4afedc549060224 /Lib/random.py | |
parent | 4837a223eea09681f0bf41d41882cad5ade0f6ab (diff) | |
download | cpython-ffdb8bb99c4017152a9dca70669f9d6b9831d454.zip cpython-ffdb8bb99c4017152a9dca70669f9d6b9831d454.tar.gz cpython-ffdb8bb99c4017152a9dca70669f9d6b9831d454.tar.bz2 |
Use floor division operator.
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()" |