diff options
author | Raymond Hettinger <python@rcn.com> | 2016-11-13 05:42:56 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-11-13 05:42:56 (GMT) |
commit | 24e4239434a00fa38187e390eb8ab29f1864350c (patch) | |
tree | 8654d57196f6cdaa947440bf873bc677b489005e /Lib | |
parent | 7d895d3c37e2ff5189d2d8b71def4e2fee34f10b (diff) | |
download | cpython-24e4239434a00fa38187e390eb8ab29f1864350c.zip cpython-24e4239434a00fa38187e390eb8ab29f1864350c.tar.gz cpython-24e4239434a00fa38187e390eb8ab29f1864350c.tar.bz2 |
Fix typos
Diffstat (limited to 'Lib')
-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 a4413b5..fd0d2e3 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -630,7 +630,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 |