Commit c4e4f96a authored by Raymond Hettinger's avatar Raymond Hettinger

Fix typos

parent d0710a94
...@@ -352,7 +352,7 @@ class Random(_random.Random): ...@@ -352,7 +352,7 @@ class Random(_random.Random):
return [population[_int(random() * total)] for i in range(k)] return [population[_int(random() * total)] for i in range(k)]
cum_weights = list(_itertools.accumulate(weights)) cum_weights = list(_itertools.accumulate(weights))
elif weights is not None: elif weights is not None:
raise TypeError('Cannot specify both weights and cumulative_weights') raise TypeError('Cannot specify both weights and cumulative weights')
if len(cum_weights) != len(population): if len(cum_weights) != len(population):
raise ValueError('The number of weights does not match the population') raise ValueError('The number of weights does not match the population')
bisect = _bisect.bisect bisect = _bisect.bisect
......
...@@ -630,7 +630,7 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase): ...@@ -630,7 +630,7 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
self.assertEqual((x+stop)%step, 0) self.assertEqual((x+stop)%step, 0)
def test_choices_algorithms(self): def test_choices_algorithms(self):
# The various ways of specifing weights should produce the same results # The various ways of specifying weights should produce the same results
choices = self.gen.choices choices = self.gen.choices
n = 13132817 n = 13132817
......
...@@ -123,7 +123,7 @@ Library ...@@ -123,7 +123,7 @@ Library
by representing the scale as float value internally in Tk. tkinter.IntVar by representing the scale as float value internally in Tk. tkinter.IntVar
now works if float value is set to underlying Tk variable. now works if float value is set to underlying Tk variable.
- Issue #18844: The various ways of specifing weights for random.choices() - Issue #18844: The various ways of specifying weights for random.choices()
now produce the same result sequences. now produce the same result sequences.
- Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space - Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
......
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