diff --git a/examples/austria_examples.py b/examples/austria_examples.py index 30c4873..bf1e1f5 100644 --- a/examples/austria_examples.py +++ b/examples/austria_examples.py @@ -6,12 +6,14 @@ import apportionment with open("./nr_wahlen.txt", "r") as f: for line in f: - result = eval(line) - print(result[0]) - print(apportionment.method("dhondt", result[2], - sum(result[3]), - parties=result[1], - threshold=.04, - verbose=False)) + year, partynames, votes, officialresult = eval(line) + print(year) + result = apportionment.method("dhondt", votes, + 183, + parties=partynames, + threshold=.04, + verbose=True) # actual results - print(result[3]) + print("Identical with official result: " + + (str(tuple(result) == tuple(officialresult))) + + "\n\n")