Elimination¶
-
class
whalrus.Elimination(*args, **kwargs)[source]¶ An elimination method.
An
Eliminationobject is a callable whose input is aRule(which has already loaded a profile). When theEliminationobject is called, it loads the rule. The output of the call is theEliminationobject itself. But after the call, you can access to the computed variables (ending with an underscore), such aseliminated_order_,eliminated_orqualified_.- Parameters
args – If present, these parameters will be passed to
__call__immediately after initialization.kwargs – If present, these parameters will be passed to
__call__immediately after initialization.
Examples
Cf.
EliminationLastfor some examples.-
property
eliminated_¶ The eliminated candidates.
This should always be non-empty. It may contain all the candidates (for example, it is always the case when there was only one candidate in the election).
- Type
-
property
eliminated_order_¶ The order on the eliminated candidates.
It is a list where each element is a
NiceSet. Each set represents a class of tied candidates. The first set in the list represents the “best” eliminated candidates, whereas the last set represent the “worst” candidates.- Type
list