RuleVeto(*args, converter: whalrus.converters_ballot.converter_ballot.ConverterBallot = None, scorer: whalrus.scorers.scorer.Scorer = None, **kwargs)¶
The veto rule.
>>> RuleVeto(['a', 'b', 'b', 'c', 'c']).winner_ 'a'
The average score.
The average score as a float. It is the same as
average_score_, but converted to a float.
The best score as a float. It is the same as
RuleScore.best_score_, but converted to a float.
compare_scores(one: numbers.Number, another: numbers.Number) → int¶
Compare two scores.
- one (object) – A score.
- another (object) – A score.
0 if they are equal, a positive number if
oneis greater than
another, a negative number otherwise.
Gross scores as floats. It is the same as
gross_scores_, but converted to floats.
Number of candidates.
Scores as floats. It is the same as
scores_, but converted to floats.
Result of the election as a strict order over the candidates. The first element is the winner, etc. This may use the tie-breaking rule.
Weights as floats. It is the same as
weights_, but converted to floats.