]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typos
authorRaymond Hettinger <python@rcn.com>
Sun, 13 Nov 2016 05:42:56 +0000 (00:42 -0500)
committerRaymond Hettinger <python@rcn.com>
Sun, 13 Nov 2016 05:42:56 +0000 (00:42 -0500)
Lib/random.py
Lib/test/test_random.py
Misc/NEWS

index d557acc92b9754b1ccb386df0d67ab6af07efe3f..ca90e1459d9964632d62ec8618891e223aed3239 100644 (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
index a4413b5146db79d183b70fc2af7c6fb1a44567e7..fd0d2e319ec507418d16f0f1a8f87093321e351a 100644 (file)
@@ -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
 
index 59785c3785c19e7f3900769e183d3381701c6eae..9001bad3bc21af74e8a25d625da9e16d577eea1a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -123,7 +123,7 @@ Library
   by representing the scale as float value internally in Tk.  tkinter.IntVar
   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.
 
 - Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space