]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Minor code cleanup
authorRaymond Hettinger <python@rcn.com>
Tue, 7 Sep 2010 00:48:40 +0000 (00:48 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 7 Sep 2010 00:48:40 +0000 (00:48 +0000)
Lib/random.py

index 4ff65ab8ea5776494722c05d20bf322c748353f6..8bfae1d16a1f74b026535fab71ac9fb70578b44d 100644 (file)
@@ -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)