mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Fix typos
This commit is contained in:
parent
7d895d3c37
commit
24e4239434
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue