Commit bb2fdad2 authored by Fred Drake's avatar Fred Drake

Line-wrap and properly indent a couple of docstrings.

parent 4f9c5335
......@@ -82,7 +82,9 @@ class whrandom:
return a + (b-a) * self.random()
def randint(self, a, b):
"""Get a random integer in the range [a, b] including both end points.
"""Get a random integer in the range [a, b] including
both end points.
(Deprecated; use randrange below.)"""
return self.randrange(a, b+1)
......@@ -91,7 +93,8 @@ class whrandom:
return seq[int(self.random() * len(seq))]
def randrange(self, start, stop=None, step=1, int=int, default=None):
"""Choose a random item from range([start,] step[, stop]).
"""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' and 'default' arguments."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment