We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42511fc commit 099620bCopy full SHA for 099620b
Lib/random.py
@@ -282,10 +282,10 @@ def randbytes(self, n):
282
## -------------------- integer methods -------------------
283
284
def randrange(self, start, stop=None, step=_ONE):
285
- """Choose a random item from range(start, stop[, step]).
+ """Choose a random item from range(stop) or range(start, stop[, step]).
286
287
- This fixes the problem with randint() which includes the
288
- endpoint; in Python this is usually not what you want.
+ Roughly equivalent to ``choice(range(start, stop, step))`` but
+ supports arbitrarily large ranges and is optimized for common cases.
289
290
"""
291
0 commit comments