mirror of
https://github.com/python/cpython.git
synced 2025-07-15 07:15:18 +00:00
[3.11] Backport docstring improvement from 3.12 (#98288)
Backport docstring improvement from 3.12
This commit is contained in:
parent
42511fc72d
commit
099620b0ce
1 changed files with 3 additions and 3 deletions
|
@ -282,10 +282,10 @@ class Random(_random.Random):
|
|||
## -------------------- integer methods -------------------
|
||||
|
||||
def randrange(self, start, stop=None, step=_ONE):
|
||||
"""Choose a random item from range(start, stop[, step]).
|
||||
"""Choose a random item from range(stop) or range(start, stop[, step]).
|
||||
|
||||
This fixes the problem with randint() which includes the
|
||||
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.
|
||||
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue