commit | ffdb8bb99c4017152a9dca70669f9d6b9831d454 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Mon Sep 27 15:29:05 2004 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Mon Sep 27 15:29:05 2004 +0000 |
tree | 561cf9198f1aa05d12d126a1a4afedc549060224 | |
parent | 4837a223eea09681f0bf41d41882cad5ade0f6ab [diff] [blame] |
Use floor division operator.
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 @@ 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()"