Minor code beautification

This commit is contained in:
Raymond Hettinger 2016-11-01 22:23:11 -07:00
parent 16ef5d4ae1
commit 8567e58ae3
1 changed files with 1 additions and 2 deletions

View File

@ -350,7 +350,6 @@ class Random(_random.Random):
_int = int
total = len(population)
return [population[_int(random() * total)] for i in range(k)]
else:
cum_weights = list(_itertools.accumulate(weights))
elif weights is not None:
raise TypeError('Cannot specify both weights and cumulative_weights')