diff options
author | Raymond Hettinger <python@rcn.com> | 2016-11-13 05:44:24 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-11-13 05:44:24 (GMT) |
commit | 77f6411d9630c44b2b959ec8a4eb9d21078c1826 (patch) | |
tree | 425e4cc69f69dcee3e6a4c02dddf7fa145077f63 | |
parent | cf767ab4dac1315da42d283eb9bf8e5de225511d (diff) | |
parent | 24e4239434a00fa38187e390eb8ab29f1864350c (diff) | |
download | cpython-77f6411d9630c44b2b959ec8a4eb9d21078c1826.zip cpython-77f6411d9630c44b2b959ec8a4eb9d21078c1826.tar.gz cpython-77f6411d9630c44b2b959ec8a4eb9d21078c1826.tar.bz2 |
merge
-rw-r--r-- | Lib/random.py | 2 | ||||
-rw-r--r-- | Lib/test/test_random.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/random.py b/Lib/random.py index d557acc..ca90e14 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -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 diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index f86077c..d2fa9d2 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -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 |