This commit is contained in:
Raymond Hettinger 2016-11-13 00:44:24 -05:00
commit 77f6411d96
2 changed files with 2 additions and 2 deletions

View File

@ -352,7 +352,7 @@ class Random(_random.Random):
return [population[_int(random() * total)] for i in range(k)]
cum_weights = list(_itertools.accumulate(weights))
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):
raise ValueError('The number of weights does not match the population')
bisect = _bisect.bisect

View File

@ -626,7 +626,7 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
self.assertEqual((x+stop)%step, 0)
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
n = 13132817