summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-09-07 00:48:40 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-09-07 00:48:40 (GMT)
commit3051cc3a0d390ba153c07db9ce31a44700e332f2 (patch)
treee349f636ea26ac7c66145c2b574001a1bc07a6b6 /Lib/random.py
parentf763a728adf45926bd75fc6a499eefa4d845b683 (diff)
downloadcpython-3051cc3a0d390ba153c07db9ce31a44700e332f2.zip
cpython-3051cc3a0d390ba153c07db9ce31a44700e332f2.tar.gz
cpython-3051cc3a0d390ba153c07db9ce31a44700e332f2.tar.bz2
Minor code cleanup
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 4ff65ab..8bfae1d 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -161,13 +161,13 @@ class Random(_random.Random):
## -------------------- integer methods -------------------
- def randrange(self, start, stop=None, step=1, int=int, default=None,
- maxwidth=1<<BPF):
+ def randrange(self, start, stop=None, step=1, int=int, maxwidth=1<<BPF):
"""Choose a random item from range(start, stop[, step]).
This fixes the problem with randint() which includes the
endpoint; in Python this is usually not what you want.
- Do not supply the 'int', 'default', and 'maxwidth' arguments.
+
+ Do not supply the 'int' and 'maxwidth' arguments.
"""
# This code is a bit messy to make it fast for the
@@ -175,7 +175,7 @@ class Random(_random.Random):
istart = int(start)
if istart != start:
raise ValueError("non-integer arg 1 for randrange()")
- if stop is default:
+ if stop is None:
if istart > 0:
if istart >= maxwidth:
return self._randbelow(istart)