components.Score¶
- class components.Score(answers=0, correct=0, member=None)¶
Bases:
object
A single score count. Scores are comparable, i.e.
score_1 == score_2
if and only if theanswers
andcorrect
attributes are equal. Moreover, scores can be evaluated as boolean, wherebool(score) == True
ifanswers
is greater than zero. Finally, scores are ordered:score_1 < score_2
, ifscore_1
has a smallerratio
than score_2, or, if the ratios coincide, has fewer recorded answers.- Parameters